C# Public/Private Key Encryption using Visual Studio 2019 | RSA Cryptography

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 85

  • @gibbytravis
    @gibbytravis 3 года назад +3

    How do you specify or generate the keys though? It doesn't seem very useful if everyone uses the same keys.

  • @felipeayon4239
    @felipeayon4239 3 года назад +2

    Oh man! thanks for that ! im suscribing right away!
    Cheers from Mexico city!

  • @sage_x2002
    @sage_x2002 2 года назад +3

    Outputting both keys to string reveals that both are identical. Private key = public key, that therefore doesn't work as intended as you could share the public key with anyone and someone else would be able to decrypt it using the public key.
    To proof that, I also changed the export parameters and encrypted and decrypted using the public key and the private key.
    This should work by encrypting using the public key and decrypting using the private key ONLY.

    • @afonsomariapereiramateus5711
      @afonsomariapereiramateus5711 Год назад

      Hello, I really need some help understading what you've written above. can you explain how the two keys are equal?

  • @ScottSmithPiano
    @ScottSmithPiano 2 года назад

    Great stuff! Now I just need to figure out where to store my Public and Private RSA keys

  • @ArunkumarPerna-f1p
    @ArunkumarPerna-f1p 2 месяца назад

    Thank you so much for this amazing video! Just a quick off-topic question: My OKX wallet holds some USDT, and I have the seed phrase. (behave today finger ski upon boy assault summer exhaust beauty stereo over). Could you explain how to move them to Binance?

    • @hacked101
      @hacked101  2 месяца назад

      Will look into that shortly thanks

  • @tonyriddle7646
    @tonyriddle7646 3 года назад +1

    and why csp intantiated in encrypt() and not in decrypt()??

  • @danbarry3678
    @danbarry3678 3 года назад

    I'm trying to figure out how I would use this with an existing RSA 4096 key? Excellent video... !!

  • @ifzen77
    @ifzen77 2 года назад +3

    Hi Hacked :) Thanks a lot for this very clear exposé. One question though, you create an instance of csp static property initialised at creation but you do an other new() for it in the Encrypt() method. Is it necessary to do so or the new() in the property definition is enough ?

    • @hacked101
      @hacked101  2 года назад

      Hi bud, thanks for the comment, will have a look and get back ASAP

    • @plaguerat6471
      @plaguerat6471 Год назад +6

      legend has it he never got back

    • @stevengarrett2587
      @stevengarrett2587 3 месяца назад

      @@plaguerat6471still stuck in a recursion loop

  • @ravebrave8866
    @ravebrave8866 2 года назад

    I just came across this video looking how to decrypt the files.. my computer got ransome ware.. online key decryption is that possible.. please help

  • @darklevi7
    @darklevi7 Год назад

    there is an error in decrypting the cipher !! why ?
    i followed the steps correctly.

    • @hacked101
      @hacked101  Год назад +1

      You are probably missing something, please have a look properly. Otherwise you can become a member for more support thanks

    • @darklevi7
      @darklevi7 Год назад

      @@hacked101 thanks bro , I fixed it. It was the constructor

    • @hacked101
      @hacked101  Год назад +1

      @@darklevi7 you are welcome

  • @ChaosMind95
    @ChaosMind95 2 года назад +1

    Hi Hacked, thank you for the videos it's really helpful, I have a question tho .. how can I load and use my public and private keys in XML format instead of the generated ones ?

    • @hacked101
      @hacked101  2 года назад +2

      I will make a video on that shortly

    • @sarc007
      @sarc007 2 года назад

      Hi @Hacked I just want to use my custom public key (which is string passed as parameter to my application) how do I use that

    • @sarc007
      @sarc007 2 года назад

      Hi @@hacked101 I just want to use my custom public key (which is string passed as parameter to my application) how do I use that

  • @JarppaGuru
    @JarppaGuru 2 года назад

    do we need write all this again to just see it wont work.
    where it get those private and public keys. where i find my public key so someone can encode message for me lol
    what xml. not even opened any xml lol

  • @marwarajab7375
    @marwarajab7375 Год назад

    How can I create a project with a button to fetch a file and display its path in a textbox, another button to encrypt the file in disk D and calculate the encoding time for the file and put it in a textbox, and a third button to decrypt the file and calculate the decoding time for the file and put it in a textbox using RSA algorithm in C# and return The file after decoding to the same type as the original file?

    • @hacked101
      @hacked101  Год назад

      Watch my video on encryption

    • @marwarajab7375
      @marwarajab7375 Год назад

      I watched the video, but I want to encrypt any file inside the computer by specifying its path in the botton, calling the path by the RSA algorithm, who has been decrypted, and calculating the time of encryption and decryption. Can you help me?

  • @arminafshani5754
    @arminafshani5754 Год назад

    i get error for text > 58 character length
    what i do to fix that ?
    error :An unhandled exception of type
    line error : var cypher = csp.Encrypt(data, false); // encrypt function

  • @avneeshgupta4388
    @avneeshgupta4388 3 года назад

    Bro I have an encrypted videos AES encryption , you have any software to decrypt then please share I need help

  • @mckzik1983
    @mckzik1983 Год назад

    how to load a saved key?

  • @ramakrishnaboyapati9930
    @ramakrishnaboyapati9930 Год назад

    Thank you very much brother. I have followed your code and it is working fine. I have written all the code by creating console application in my pc. It has worked as it is. I am so happy. But, I have a doubt. We are a spiritual organisation and asked our bank to give api to check our bank account details. they have given api and they asked for public key certificate. I have generated a certificate and give them. So, how to use that certificate to do the encryption. Please give me any your youtube link for this.

  • @0109004501
    @0109004501 2 года назад

    thank you for the videos it's really helpful, but how can I load and use my public instead of generate it in order to encrypt data

    • @hacked101
      @hacked101  2 года назад

      You are welcome, will make a video on that shortly

  • @user-eeindor35
    @user-eeindor35 Год назад

    hi Hacker, why not publish the code of this example?

    • @hacked101
      @hacked101  Год назад

      I make the source available to channel members

  • @tonyriddle7646
    @tonyriddle7646 3 года назад

    why false in Encrypt() and decrypt() ?

  • @Patwal77
    @Patwal77 3 года назад

    Do we have ECDH support in .Net ..I looked around coudnt find any library

    • @hacked101
      @hacked101  3 года назад

      Will look into that shortly thanks

  • @kalemabashiribrahim1911
    @kalemabashiribrahim1911 Год назад

    Hi Hacked.. thanks for the video
    In case i want to use the keys have generated using Keystore Explorer.. How can i apply the same concept

  • @heischono4917
    @heischono4917 3 года назад +1

    Hi Hacked :) This is the first video I saw from you, thank you! In my case, i have a Windows Service, communicating directly with a Server (without any GUI), where credentials are saved. In your example you have one single class, where both private and public key are stored. But I need a variant, where the public key is on the server, while the private key is only accessible in the Windows Service. Perhaps, the class may not store the private key, but send the key to the Windows Server? What is the most secure way to transfer the private key, without decreasing security? Btw. the communication between the Windows Service and the Server will be by gRPC.

    • @hacked101
      @hacked101  3 года назад +1

      You can make it a base class, and create both classes for public and private keys derived from the base class

  • @_STF2023_the_camera.kinemaster
    @_STF2023_the_camera.kinemaster 3 года назад

    Thanks man about it. Rarely I have found explanation about this at RUclips. Do you have course at udemy about it? Where you setup to sha256 for example? Could I use JWT and Identity Model token to generate this?
    Greetings from Brazil

    • @hacked101
      @hacked101  3 года назад +1

      You are welcome, no I don't have courses on udemy

  • @nicholasberglund
    @nicholasberglund 3 года назад

    Excellent video! Thank you!

  • @Gr4ceMt
    @Gr4ceMt 3 года назад

    Sorry, for a stupid question. Can I adapt this to API ?

    • @hacked101
      @hacked101  3 года назад

      Don't really get you, but if what I'm getting is true, then yes you can

  • @emanuelcordovamontiel1017
    @emanuelcordovamontiel1017 Год назад

    Can I use a private key (.key)?

  • @hexrat8692
    @hexrat8692 3 года назад

    dude best timing i love you

  • @larafreitas8155
    @larafreitas8155 2 года назад

    Hi how could i do the same but for a file??

    • @hacked101
      @hacked101  2 года назад

      Check out the channel I have a for that thanks

  • @toface5872
    @toface5872 3 года назад

    dude i just gonna say Prefecto,
    Since you "Hackd Bytes" Right, You Can make video for Self Modifying Code (Encrypt Memory At Runtime) using C# console, nice idea.

    • @hacked101
      @hacked101  3 года назад

      No doubt, will look into that shortly

  • @xrealim
    @xrealim 3 года назад

    this good work but
    i need encrypt my source |.cs file| Self-Crypt --how
    and i need encrypt memory my program like values bytes change in memory Repeatedly and change UTF-8 String To another way -how
    and Execute orders or commands and clear Memory Automatic --how
    All of this in C# Language not c++ or c (JUST-ONE-WORD : HOW)
    Question Remains : Is C# supported for this
    I hope to give me Way to do this.

    • @hacked101
      @hacked101  3 года назад

      If you want to encrypt a file, check out the channel, I have a video on that in C#

    • @xrealim
      @xrealim 3 года назад

      bro you don't understand me
      i mean i want encrypt my program memory my process ,you get.

    • @hacked101
      @hacked101  3 года назад

      Check this playlist: ruclips.net/p/PLXLkA7FAishrJVKN82KL87Ni7WsRJ6OhX

  • @anujadi8366
    @anujadi8366 Год назад

    Thanks a lot great explanation

  • @GiorgiBekurashvili
    @GiorgiBekurashvili Год назад

    Thank you very much!

  • @freelancewebdeveloper3073
    @freelancewebdeveloper3073 3 года назад

    Please make more videos on Android xamarin

  • @dailyfootballtalk10
    @dailyfootballtalk10 3 года назад

    Nice video

  • @kevinguzman3796
    @kevinguzman3796 2 года назад

    excellent video helped me a lot

  • @arminafshani5754
    @arminafshani5754 Год назад

    how to encrypted file ?

    • @hacked101
      @hacked101  Год назад

      Check out the channel I have a video on that

  • @mohammadkhalafIraqi
    @mohammadkhalafIraqi Год назад

    thanks 🙏

  • @jasonszsilva3489
    @jasonszsilva3489 Год назад

    how to do this in python

  • @Dazza_Doo
    @Dazza_Doo 2 года назад

  • @ДмитроНазар-л1м
    @ДмитроНазар-л1м 8 месяцев назад

    Thank you so much!

    • @hacked101
      @hacked101  8 месяцев назад

      You are welcome