Questions tagged [sjcl]

The Stanford Javascript Crypto Library is a project by the Stanford Computer Security Lab to build a secure, powerful, fast, small, easy-to-use, cross-browser library for cryptography in Javascript.

The Stanford Javascript Crypto Library is a project by the Stanford Computer Security Lab to build a secure, powerful, fast, small, easy-to-use, cross-browser library for cryptography in Javascript.

Project home page

79 questions
0
votes
1 answer

Implementing SJCL .frombits in python

I'm trying to rewrite some JS (which uses the SJCL library) in Python using pycrypto. I'm having trouble figuring out how to implement the following code aes = new sjcl.cipher.aes( this.key ); bits = sjcl.codec.utf8String.toBits( text ); cipher =…
dan
  • 305
  • 1
  • 13
0
votes
1 answer

Decrypt SJCL cipher text in Objective-C

I am receiving data encrypted with SJCL into an iOS app where I need to decrypt it. The other end is using SJCL with the AES CCM mode which is not supported by the Apple's CommonCrypto so I use the VPCCMCrypt library for this. It is not possible to…
shelll
  • 3,234
  • 3
  • 33
  • 67
0
votes
1 answer

How to export SJCL AES key back to raw format?

After I imported SJCL AES key using new sjcl.cipher.aes(rawKey), how can I get rawKey value back from the key instance?
Mitar
  • 6,756
  • 5
  • 54
  • 86
0
votes
2 answers

JSON.parse() - SyntaxError: Expected end of stream at char 2

In my project, I have written google spreadsheet script to decipher encrypted cell content using sjcl. But I failed. function encryptCell() { var masterKey = Browser.inputBox('Enter masterKey'); var spreadSheet =…
Nilesh
  • 2,089
  • 3
  • 29
  • 53
0
votes
1 answer

End to End encryption using Codeigniter

I'm working on a web app which will have very serious and sensitive data in it. How do I use Codeigniter on the backend and on the frontend some other library to encrypt data throughout the GET and SET process ( Client server encrypted…
Sahan
  • 1,422
  • 2
  • 18
  • 33
0
votes
1 answer

SJCL key generation

for my website "moneyart.info" I want to generate ECC public and private keys with JavaScript library sjcl. I tried following code: * crypto_keys = sjcl.ecc.elGamal.generateKeys(256); var public_key = crypto_keys.pub.get(); var secret_key =…
user4375474
0
votes
1 answer

decrypt data using master key and not key used for encryption

I am trying to build an application that stores user related information client side in localstorage. I am encrypting that data with a password given by user. If I implement forgot password and generate a new password how can I get back my data that…
Vardhan
  • 69
  • 5
0
votes
1 answer

Is SJCL.random.startCollectors() automatic?

If I import sjcl.js, then put only console.log(sjcl.random.isReady()); It returns 2. But I didn't run sjcl.random.startCollectors(); So I'm wondering if the entropy collector is auto-started on loading.
0
votes
1 answer

Read a long file and use nodejs to crypt

This is my first question. English is not my first language. I have a file that contains around 800K lines. I have to read and encrypt them using the sjcl library. Until now, the only thing I did is this lines: var sjcl =…
0
votes
0 answers

decryption at client side with javascript?

I am getting an encrypted text on the client side which has been encrypted at server(with java) using AES-256 bit , and SHA-256 (2048 bit), i have no idea how to decrypt it. (provided that i am having a key at the client side which has been used at…
Novice
  • 401
  • 7
  • 27
0
votes
1 answer

Access IndexedDB as a file from javascript to encrypt it

I have created an indexedDB with pouchDB in my angular webapp. Each time I close my app, I would like to be able to encrypt this database file. So I had the idea of encrypting the database file with SJCL. My web app will be accessible only when the…
Nate
  • 7,606
  • 23
  • 72
  • 124
0
votes
1 answer

encryption on the server side (using java) and decryption on the client side(using any javascript crypto library)

I want to decrypt the data on the client side which is coming from the server side encrypted with java (using asymmetric key), but i do not have any idea that how it will work? do i need to use some jar or something on the server side ? what…
Novice
  • 401
  • 7
  • 27
0
votes
1 answer

ECC with SJCL , generate a key that expires automatically

i have already asked a little similar question here but i am asking it in a different way and a little change. now my question is. is it possible to have a public key on the server side through which i can encrypt the message and have a private key…
Novice
  • 401
  • 7
  • 27
0
votes
1 answer

Int Array to Base64 in C# like sjcl.codec.base64.fromBits does

In JavaScript, doing this: var numbers = new Array(1042147201, -1682263442, -1463053899, 1834416100) sjcl.codec.base64.fromBits(numbers) Return "Ph3ngZu6sm6oy5G1bVb35A==", but doing this in C#: var numbers = new[] { 1042147201, -1682263442,…
NKnusperer
  • 974
  • 1
  • 11
  • 31
0
votes
1 answer

generate a key for SJCL that expires automatically after a period of time?

I want to encrypt and decrypt the data on client-side for that i am using SJCL library, but i want my key to be expired after a scheduled time , so my question here is - is it possible to generate such a key while using SJCL(or any other library…
Novice
  • 401
  • 7
  • 27