Asymmetric Encryption and Decryption in .NET Core using RSA Public/Private Key Pairs

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

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

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

    Thanks, you saved me!

  • @anithakandimalla9283
    @anithakandimalla9283 4 месяца назад

    Thanks alot you saved me

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

    Thanks i was stuck in the Decryption and this really helpted me

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

    you said you used the public key for encryption and the private key for decryption. But you mean the other way around right? :)

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

      It's the correct sequence
      Public key is exposed so it's only used for encryption but until you have the private key you can't read the plain text.

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

    hello, i get Message=Unable to cast object of type 'Org.BouncyCastle.Crypto.Parameters.RsaPrivateCrtKeyParameters' to type 'Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair'.
    kindly help

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

      Hi.. getting the same error, where you able to get a fix for this?.. thank you

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

    Hello, thanks for your contribution. Question, can the key be used directly as a string and not as a .pem file?

  • @SamuelLawal-y7f
    @SamuelLawal-y7f 11 месяцев назад

    What can you do when you are getting an error that says "Bad Length" at the point of encrypting?

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

    good tuto, why did not share full code of the project ?

  • @padmanathanramasamy8354
    @padmanathanramasamy8354 10 месяцев назад

    Can you share the steps of creating private and public key using open SSL

    • @TechnoSaviour
      @TechnoSaviour  10 месяцев назад

      I have already shared a videos, please check the playlist

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

    'Bad length' exception thrown when encrypting larger text. This cud b the limitation of RSA. Pls suggest any alternative approach. Also make a video on how to encrypt JSON/serialized data.

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

    can you tell me how to store the string in the public key variable and use the key to decrypt/encrypt the text

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

    How can you make it independent of the private key at the server end? Is it possible to generate a private key at every user end as soon as the user opens the chat window at his end so that it behaves like end to end encryption?

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

    can you make a video on creating a JWT Token using RSA Public/Private Keys

  • @TheMubeenyou
    @TheMubeenyou 4 года назад +1

    What is EnctyptionResponse

  • @vikasshelake6321
    @vikasshelake6321 4 года назад

    when you going to post your next video on client side cryptography, im waiting for it.

    • @TechnoSaviour
      @TechnoSaviour  4 года назад

      Video is not available - ruclips.net/video/rH_fZ4Zkxic/видео.html

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

    will it work on other OS? Or it is just for windows?

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

    can I use public key for decryption?

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

    Sir
    what does the script EncryptionResponse.cs contain ?

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

    Where is the ".pem" came from ?

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

      Generated using openssl
      ruclips.net/video/iHb3nFtzFoc/видео.html

  • @orney21d
    @orney21d 4 года назад

    Hi, before all, thanks for sharing. I guess this method works cross-platform for RSA asymmetric encryption/decryption right??. I heard some issues against some SPC for Windows against Linux ... Thanks .

    • @orney21d
      @orney21d 4 года назад

      Also , for instance if I use in the helper RSA instead RSACryptoServiceProvider through
      RSA csp = RSA.Create(rsaParams); and then for encrypt / decrypt using the code below :
      RSAEncryptionPadding oaepsha256 = RSAEncryptionPadding.OaepSHA256;
      var encryptedBytes = _publicKey.Encrypt(Encoding.UTF8.GetBytes(text), oaepsha256);
      Do you think this approach would cause less issues if we need to support multiplatform (Linux-Windows)....
      Cheers!