Thank you! your video helped me to implement a pair of RSA keys encrypting-decrypting function in my code for my exam project, very useful and well-explained!
That's good for the basics. To people who think about using exactly that solution, I would recommend not generate the keys one time and use them forever. Generate new keys for every package you want to send. The first information exchange will be the public keys of client and server and the second exchange round is transmitting the encrypted package. To make sure the package is not manipulated, extend the encryption with a signature.
I am quite confused in one thing . We are creating public and private key. And encrypting our string with that public key So if we are decrypting with private key how node-rsa specifiy that this private key is only used to decrypt the data not any other , as both public and private keys are independent not dependent to each other
How the sign and verify works in node-rsa? I implement at my local but all time give me false verify all tho plain text, and keys are everything correct but not sure what happened? Can you please explain?
because the public key will travel through the internet but the private key can't, and a hacker can get the public key (because it is traveling though the internet) so when a hackers gets it, it's point less, because a public key can only encrypt and can't decrypt, so this is why RSA is a very safe way of transferring data
Any tips for reading an encrypted message that is encrypted elsewhere? I have the private key and I tried importing the private key but it keeps giving me an error saying the private key is wrong?
I find it interesting that u use the public key for encryption & the private key for decryption. I usually read about it being the other way around. What is the reasoning behind doing this in your opinion?
Encrypt with public key an decrypt with private key is the way. Please watch the following video: ua-cam.com/video/AQDCe585Lnc/v-deo.html&ab_channel=SimplyExplained
I try using a pair of keys (public an private) generated by the command "ssh-keygen -t rsa -b 4096 -a 100 -f mykey" and work very well. I hope it can be useful.
Facing some problem while encrypting with private key and decrypting with public key. Here is my code sample const nodeRsa = require('node-rsa'); const key = new nodeRsa({ b: 1024 }),//public and private keys publicKey = key.exportKey('public'); privateKey = key.exportKey('private'); let encryptedString = keyPrivate.encrypt("Secret", 'base64'); let decryptedStrig= keyPublic.decrypt(encryptedString, 'utf8'); Am getting the error message as Error during decryption (probably incorrect key). Original error: Error: This is not private key This message during decrypt. Please help. Thanks for this lovely video though.
Bro i can't thank you enough, every video is useless except for yours, thank you.
Perfect!!! You must be god and saving me Asymmetric, many thank!
Thanks for your encouraging words 🙏
Thank you! your video helped me to implement a pair of RSA keys encrypting-decrypting function in my code for my exam project, very useful and well-explained!
That's good for the basics. To people who think about using exactly that solution, I would recommend not generate the keys one time and use them forever. Generate new keys for every package you want to send. The first information exchange will be the public keys of client and server and the second exchange round is transmitting the encrypted package. To make sure the package is not manipulated, extend the encryption with a signature.
Rightly pointed
I can't run this in node js 8 version. Can you tell me how can I do the same thing in node js 8 version using crypto?
Hi im getting error like RSA PADDING CHECK PKCS1 OAEP ,OAEP DECODING ERROR ..help me
Nice video. Got so much to learn.. Thank you
I am quite confused in one thing .
We are creating public and private key.
And encrypting our string with that public key
So if we are decrypting with private key how node-rsa specifiy that this private key is only used to decrypt the data not any other , as both public and private keys are independent not dependent to each other
How the sign and verify works in node-rsa? I implement at my local but all time give me false verify all tho plain text, and keys are everything correct but not sure what happened? Can you please explain?
how can
i use with client side
I am new to this, I have everything the same, but when I try to run it, the output is not displayed, could you tell me the reason?
hiii nice video but how can i use this module to encrypt a file that i'm going to send
You can try converting the file to base64 string then encrypt it
Very very useful information. Thank you very much.
why cant i use the private key for encryption and public key for decryption
because the public key will travel through the internet but the private key can't, and a hacker can get the public key (because it is traveling though the internet) so when a hackers gets it, it's point less, because a public key can only encrypt and can't decrypt, so this is why RSA is a very safe way of transferring data
Hello, I need to convert a NodeJS function (using the crypto-js library) to PHP. I can pay for it. Can you do that?
Yes I can do that. Is this job still available?
Any tips for reading an encrypted message that is encrypted elsewhere? I have the private key and I tried importing the private key but it keeps giving me an error saying the private key is wrong?
any luck? I am also working on the same requirement.
Can we use this in angular 12?
I find it interesting that u use the public key for encryption & the private key for decryption. I usually read about it being the other way around. What is the reasoning behind doing this in your opinion?
Encrypt with public key an decrypt with private key is the way. Please watch the following video: ua-cam.com/video/AQDCe585Lnc/v-deo.html&ab_channel=SimplyExplained
depends who is sending the data to whom
Super
GG mate, thanks
Thank you too!
Do you have example using asp.net core c#
I'm planning to make one with a combination of Angular and .net core
aju xheringmo.. very helpful
can we use custom private key for decryption, how can i achieve it
I try using a pair of keys (public an private) generated by the command "ssh-keygen -t rsa -b 4096 -a 100 -f mykey" and work very well. I hope it can be useful.
Thank you for help .. But How I can apply this on my message in my project
Please reply
Nice vid.
Thanks
Like it!
Thank you! Cheers!
You could just use built in crypto lib.
thanks
You're welcome!
can i use it in react js ??
Yes, it’s a browser feature can be implemented in any language
Nice vid, you could have used a string literal 8:10
Thanks, will use it for other videos
Please type fast.. video length will be small..
🤣 yeah ... Will work on it asap
Why not just use nodejs’s native crypto module?
You can use, I was focused on showing how it works
Thanks for the video, you give a good example, but you are talking way too slow
Thanks for your suggestion, I'm working on it
You can easily set the video speed
Facing some problem while encrypting with private key and decrypting with public key.
Here is my code sample
const nodeRsa = require('node-rsa');
const key = new nodeRsa({ b: 1024 }),//public and private keys
publicKey = key.exportKey('public');
privateKey = key.exportKey('private');
let encryptedString = keyPrivate.encrypt("Secret", 'base64');
let decryptedStrig= keyPublic.decrypt(encryptedString, 'utf8');
Am getting the error message as
Error during decryption (probably incorrect key). Original error: Error: This is not private key
This message during decrypt.
Please help.
Thanks for this lovely video though.
You are using private key for encryption and public key for decryption.
It should be other way round
Let encryptedstring = keyPublic.encrypt(......
Thanks