how to use RSA encryption keys to encrypt a string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2019 05:26 AM
We have a requirement where we need to integrate with a third party tool using REST method.
We have been given a RSA public key and we need to encrypt a given string using RSA encryption before passing it on to the tool using POST.
We know of GlideEncrypter api which uses 3DES method to encrypt by default.
how do we use RSA encryption?
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2021 12:47 PM
You could transform one of the libraries listed on the RSA and ECC in JavaScript page of Stanford.
You than need to store the RSA public key somewhere (maybe a custom table).
Than you use whatever the encryption routine of the chosen library is.
The example on jsencrypt project's page might also be of great help.
In theory what you need to do is the encrypt your text using a public key and the RSA method. The recipient than can decrypt your message using the matching private key only the recipient has.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2021 12:48 PM
If you could post the public key you are supposed to use, I could have a crack at it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2021 04:16 AM
Hi János,
I have the same requirement to encrypt the string using RSA_PKCS1 algorithm in ServiceNow.
Could you please elaborate more with the solution you have provided above to achieve this?
Thanks,
Vidya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2021 04:42 AM
Hello, so you have a public key and want to use it to encrypt some text?