Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0

Use public/private keys for data encryption?


I'm not sure if this is possible as the encrypt function can only use an AES key. Are there any other methods that use the public/pricate key from the generateKeyPairs function?

Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You should look to the docs. I'm not versed in pub/priv key pairs but I imagine the decrypt function takes either key(but usually the private?) to decrypt encrypted data

Share this post

Link to post
Share on other sites
  • 0

@Niami Here is a link https://ocdoc.cil.li/component:data

Basically it works like this: user A and B both generate a key pair. Then they exchange their public keys. Then the actual AES encryption key is calculated from own private and other users public key these calculations end up in the same result. In other words: A public + B private = B public + A private. Thus allowing encryption and decryption. 

This is explained in the docs, but poorly.

I may have some examples,I might share if you're interested. 

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.