Tagged Questions
0
votes
1answer
9 views
Crypto-Js different output from mcrypt Upon chage of data to encrypt
My question now has connection to this one Crypto-Js different output from mcrypt that's why I used the same question but added a few extra lines to explain it better.
Based on my previous question ...
-4
votes
3answers
36 views
Encrypt data using js
Is it possible/viable to encrypt data using Java-Script before sending it to a request?
If so, you have any example on how to do it safely?
1
vote
1answer
20 views
Crypto-Js different output from mcrypt
I have a js script which encrypts data which is 'Blader'. If I encrypt it it returns an output of
JS-SCRIPT RESULT
uqnOrevjCc2YCvY3uKNjzA==
Now, being this answer as a base for comparison, I ...
1
vote
0answers
36 views
3des encryption in Node.JS returning invalid IV length
I'm quite new to Node and have run into an issue with the encryption object:
var des3_key = new Buffer("redacted", "base64"); // copied from key in chilk
var des3_iv = new Buffer("alsoredacted", ...
0
votes
1answer
38 views
CryptoJS extra parameter in AES Encrypt. How to replicate with PHP? [on hold]
I am trying to replicate the following CryptoJS 3.1.2 code with PHP 5.4.4 :
var plaintext = 'test';
var key = CryptoJS.enc.Utf8.parse('9rIY8vV8DdOKx3m6JocjEaObhhYc2NfY');
var iv = ...
2
votes
3answers
38 views
openssl_pkey_get_details($res) returns no public exponent
I'm using this example for javascript encryption using a key generated with the php openssl library, but $details = openssl_pkey_get_details($resource) is returning no public exponent ...
0
votes
3answers
51 views
Encrypt with PHP, Decrypt with Javascript (cryptojs)
I'm having trouble with basic encryption/decryption. I've looked all around for a working example but haven't quite found a working example.
-I will be encrypting in php, decrypting with cryptojs for ...
0
votes
0answers
44 views
How to encrypt php variable in javascript?
When I creat a php variable in javascript, I use this method:
var jArray = <?php echo json_encode($myArray); ?>;
It's very good but if i view the source code, ther is my full array in the ...
1
vote
1answer
34 views
Website user logins with no Database [closed]
To make a highly scalable and highly available website I am considering authenticating user using no database calls. Here is how I imagine it could be done. Basically, a url is generated on the server ...
0
votes
1answer
26 views
how to encrypt-decrypt Node.js Crypto aes256 Cipher
i have to encrypt password string inside javascript front-code and using $.ajax i used to send that encrypted password in node.js but i dont know how to decrypt that password inside node.js
i got one ...
1
vote
1answer
25 views
Securing requests between HTML/JavaScript-frontend and backend (authentication)
I am trying to create a secure way for users to log in to and perform certain authorized actions on my custom website. I am trying to have good security without the use of SSL.
At login now, this is ...
0
votes
0answers
30 views
Decrypting PHP aes encryption in javascript
I've been programming for years now, but never had to do anything with encryption/decryption.
So I've got the following PHP:
function base64_url_decode($input) {
return base64_decode(strtr($input, ...
0
votes
1answer
43 views
Simple asymmetric encryption algorithm
I want to implement simple asymmetric encryption algorithm using javascript (or reuse open library). I don't want to use RSA (or other algorithms), because they are complicated. All I want to do is ...
0
votes
1answer
52 views
JSF : How to change value of jsf input before sending request (to encrypt password)
I'm trying to implement the really good answer of FriendlyCryptoNeighbor here and I'm quite new to all jsf stuff.
In order to encrypt the password (like RSA_With_Public_Key(SHA256(password))) client ...
0
votes
0answers
32 views
digital envelope routines:EVP_DecryptFinal_ex:wrong final block length with node crypto
I am trying to decrypt a password so that I can check it against a password that a user enters on my website. I get this error when it tries to decrypt:
TypeError: error:0606506D:digital envelope ...
0
votes
1answer
51 views
Steam password encrypting with RSA (Java)
I'm using a RSA to encrypt my Steam password and then login to my steam account, but i always get a {success:false} message after a try, this is the javascript code that steam is using for their login ...
0
votes
0answers
38 views
Using Javascript to decrypt password protected zip file
I'm trying to create a chrome extension that activates when it detects an encrypted zip file in Gmail. The encrypted zip contains an mp3 file. The password for the zip file will be known before hand. ...
-1
votes
0answers
17 views
MD5 checksum on content of a file from local system in javascript [duplicate]
lets say i have a file in "D://contents/1.mp4" or "D://contents/1.jpg" .
In that i want to calculate MD5 on the contents of the file in javascript without the tag of HTML
How to do that?
1
vote
2answers
37 views
Is it worth generating a new token after every request?
I'm developing a REST api for a basic application where users can track expenses. I want to handle authentication where a user first submits a request with their credentials (email + password) and ...
0
votes
2answers
71 views
RSA Encryption Javascript and Decrypt Java
Spent almost 2 days with different combinations.I am generating a asymmetric key pair (public and private) in java using RSA algorithm and trying to use the public key in javascript to encrypt some ...
0
votes
0answers
49 views
Encrypt a JavaScript JSON coming from a PHP array
I am sending an array from PHP to the document. In the document I am encoding this array to an JSON object, so I can use it with JavaScript:
<script>
var myJSON = ...
0
votes
1answer
47 views
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 ...
0
votes
1answer
51 views
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 ...
-3
votes
2answers
25 views
Deciphering self-encrypted Javascript
I ran into a little bit of mess, when trying to 'disassemble' sort of self encrypted javascript that is sending spam to places. It is using eval() to run the encrypted parts (it is not any sort of ...
0
votes
1answer
110 views
Node.js crypto aes-256-cbc-hmac-sha1 doesn't work
I'm trying to use the aes-256-cbc-hmac-sha1 algorithm with the Node.js crypto module.
Here's a code snippet showing what I'm trying to do:
// adapted from http://stackoverflow.com/a/6046913
var ...
-2
votes
1answer
30 views
I want to encrypt blob using SHA in javascript
I want to encrypt blog using SHA in javascript so that I can send the encrypted blob chunk to server and where I can decrypt it.
5
votes
1answer
78 views
Javascript library for decryption of SMIME.p7m files
I am looking for a way to decrypt S/MIME emails on client-side. I specifically don't want client to share private key with the server and thus need to find a way for client to do everything on it's ...
0
votes
1answer
34 views
Inconsistent PBKDF2 hashes in Python (django) and Javascript (crypto.js)
Django code:
hasher = PBKDF2PasswordHasher()
print hasher.encode(u'qwerty', u'qwerty', iterations=1).split('$')[3]
# T9t/EJXFpPs2Lhca7IVGphTC/OdEloPMHw1UhDnXcyQ=
# hex: ...
0
votes
1answer
60 views
Secure user authentication in offline web apps
This question has cropped up a few times in various guises, but I've not seen an answer that satisfies my requirement or fills me with much confidence. Let me set the scene.
We currently have a web ...
0
votes
1answer
59 views
128 bit key issue in AES algorithm Java/ Java Script
I need to encrypt values in my Java code with user choice key and decrypt the values in Java script module.
Below is my Java code to encrypt the values. Here I am generating 128 bit key value from ...
-1
votes
1answer
122 views
AES Ecnrypt/Decrypt Forge Javascript
I want to create two functions encrypt(message, key) and decrypt(ciphertext, key) using the Forge library in javascript, but I dont undestand the example code.
// generate a random key and IV
var key ...
0
votes
1answer
55 views
Why doesn't Googles Javascript code for AES Encryption work in this code?
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"></script>
<script>
var toEncMes = "This is a secret message.";
var secPas = "myPassword";
var ...
1
vote
1answer
32 views
Encrypt file as string through HTTP with node.js
I'm looking for advice about what I want to do.
Currently, I use a server A to request files from a server B, by HTTP.
The server B check if the requested path exists and return the file content, as ...
0
votes
2answers
67 views
How to encrypt data from server side and pass it to client side(javascript) and decrypt and use it
I have a json string generated at server side in mvc and i access that json string in client side by simply rendering it to the html (plain).
THis json string contains some important values which ...
3
votes
2answers
121 views
HTML5 offline authentication
I am looking for advice/criticism on how best to control access to an HTML5 application that is used predominantly offline.
The application uses a combination of IndexedDB, local and session storage ...
0
votes
0answers
65 views
encrypt with javascript , decrypt with c#
In my ASP.NET MVC application Im not using SSL but I need to send password in encrypted form to server. I need some implementation like this:
in C# code :
Generate public, private keys
send the ...
0
votes
1answer
48 views
How to find a SHA1 encrypted string from the 5-word encrypted hash in Ruby?
Say you're encrypting the string "alextoul" with CryptoJS.SHA1.
As explained in the source below you get an object that looks like that:
CryptoJS.SHA1("alextoul") = {words: { 0: 1025575641 1: ...
0
votes
1answer
64 views
CryptoJS, check if AES passphrase is correct
var encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase");
var decrypted = CryptoJS.AES.decrypt(encrypted, "Secret Passphrase");
Assuming the encryption and decryption phases are ...
0
votes
2answers
53 views
Block of words converting them into number using sum equation JAVASCRIPT
This is my very first question in this website about javascript code. I've been given an RSA encryption code and our professor has given us a really wierd way to encrypt text.
The user enters the ...
1
vote
0answers
46 views
javascript decrypt crypto-js from ruby openssl
I am attempting to encrypt in ruby and decrypt in javascript. In ruby, I'm using the openssl module, and in javascript I'm using the crypto-js library.
I can encrypt and decrypt using the following ...
0
votes
2answers
37 views
Using javascript to decode a string
I am doing a challenge on hacker.org, this is what it says "I have a special piece of text that represents a specific value. Here's how I calculate it:
Start reading left to right,
If a character is ...
0
votes
0answers
25 views
creating a dynamic demo for encryption and decryption for electronic code book ( DES/ECB ) mode
what is the best way to do that ??
i would to make an demo " tutorial " for (ECB) mode
user should enter the key and the text
then the demo should view all steps ( 16 round key ) to have the cipher
...
1
vote
1answer
120 views
elgamal decryption in javascript
i need a way to calculate:
m = a. b ^(p-1-x) mod p
in javascript.
i have found this algorithm for calculating base^exp%mod:
function expmod(base, exp, mod){
if (exp == 0) return 1;
if (exp % 2 == ...
-1
votes
1answer
23 views
Is this a good way to send, store & retrieve an encrypted message? [closed]
I would like to create a web-based solution that :
- Allows encrypted messages to be sent and stored on a server.
- Allows encrypted messages to be retrieved from the server.
- Clear text messages ...
0
votes
1answer
33 views
encryption decryption in java and javascript
I am calling a restful web service written in java from java script page and from restful web service i am returning J SON data. how can i encrypt the j son data in java so that no one can see the ...
0
votes
1answer
49 views
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 ...
0
votes
1answer
39 views
How to encrypt/decrypt javascript array, while using php
I am creating javascript array dynamically using php for instance I will take one example here
<?php
echo "<script>
var array={
'A' : {
...
0
votes
3answers
16 views
how to remove a certain character at the end of the string in javascript
http://dren.ch/js_blowfish/
I'm experimenting with blowfishJS,
but it has a bug that makes it unusable
//lets say I want to encrypt the string "house"
var bf = new Blowfish('some key');
var house ...
-1
votes
1answer
61 views
How do I put a for loop encryption code into a workable table in javascript?
I am attempting to create an encryption machine where you type in a 5 digit number, it encrypts that number by changing the numbers then converting them into letters. The directions are as follows:
...
0
votes
0answers
63 views
how to decrypt/decode this?
Im working on a challenge and have te decrypt something...
but I can't figure out what kind of encryption it is.
<script>
function decrypt(inp) {
result = "";
for (var i=0; i<inp.length; ...