How does JavaScript do RSA encryption, decryption, signature and verification? Is there a useful library?

-error problem description-
the data I collected,
1) jsencrypt.js, this can be public key encryption, private key decryption, but there is a problem, there is no way to sign. If you encrypt with a private key, the public key cannot be decrypted.
2) jsrsasign.js, seems to have only signature, no encryption and decryption functions.
-END-

-A change-
the problem description that begins with my further understanding is error . I hope it will not be misleading.

1) jsencrypt.js can be encrypted and decrypted, and there is also API, for signature verification, but after testing, it seems that Java is not compatible with .
2) jsrsasign.js although the name identifies sign, it is far more than the signature function, but also has the function of encryption and decryption. The point is that is compatible with Java .

 a. , . 
 b. , .
 c. , .
 d. , .
 

use notes in detail. See my short book article: jsrsasign using notes (encryption, decryption, signature, verification)


https://github.com/brix/crypt.


https://www.npmjs.com/package.


First of all, the answers of the two people upstairs express thanks , but since the two plug-ins did not personally test the use of , I do not know whether it fits the desired answer of the question.
so, I have adopted my own scheme of testing OK.

the title temporarily adopts jsrsasign.js library.
detailed usage notes, see my brief book article: jsrsasign using notes (encryption, decryption, signature, signature, verification)


Hello, I see one of your questions, I would like to ask how to decrypt the JSEncrypt public key? The official website only sees the public key signature, but I need to decrypt

Menu