Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4612

Decryption of AES created with sjcl.js in ruby

$
0
0

Hi so lets assume that client-side has a key that is not transfered via the same channel as the encrypted data.

What I am trying to accomplish is to decrypt the result of Stanford Javascript Crypto Library (sjcl) in ruby. or for a generalisation in any other language that has a crypto library that has support for AES.

Here is what I am doing in javascript:

sjcl.encrypt('stack-password', 'overflow-secret')

And this is what I get in return:

{"iv": "Tbn0mZxQcroWnq4g/Pm+Gg","v": 1,"iter": 1000,"ks": 128,"ts": 64,"mode": "ccm","adata": "","cipher": "aes","salt": "pMQh7m9Scds","ct": "H6JRpgSdEzKUw2qEO1+HwIzAdxGTgh0"}

So what I'm actually asking is, which of these parameters I need(assuming the server already has the "stack-password" key) in order to decrypt the secret server-side, and which library should I use?May be having AES decryption library is not enough?


Viewing all articles
Browse latest Browse all 4612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>