GithubHelp home page GithubHelp logo

crypto-js's People

Watchers

James Cloos avatar

crypto-js's Issues

sha256 produces wrong output for á

What steps will reproduce the problem?
1. run Crypto.SHA256("á") in firebug

What is the expected output?
fb9778719d93551b1c88df5f1ab229f83ea30af112fc51017c9f0a383dcf6cb3

What do you see instead?
eb3e85d7fbf56104c8021681e68d771b9b9205b93e9219c8f81f60af703de381

What version of the product are you using?
2.0.0

On what operating system?
Mac/Chrome 7

Original issue reported on code.google.com by [email protected] on 17 Nov 2010 at 3:25

HMAC-SHA1 Produces different results in IE and Safari

What steps will reproduce the problem?
1. compute has using Crypto.HMAC(Crypto.SHA1, "Message", "Key", { asBytes: true 
}); in IE
2. Repeat step (1) in Safari
3. Compare array of bytes

What is the expected output? What do you see instead?
Output should be the same, but they're different.

What version of the product are you using? On what operating system?
Windows Vista Home Edition, IE 8, Safari 5

Original issue reported on code.google.com by [email protected] on 12 Nov 2010 at 5:02

HMAC SHA1 Not passing test cases

When using the HMAC SHA1 functions, the functions do not return the same
data as provided by the RFC2202 (http://www.faqs.org/rfcs/rfc2202.html).

Original issue reported on code.google.com by [email protected] on 15 Mar 2010 at 2:09

Long running script warning

Problem: Browsers will stop and display a warning when crypto operations takes 
too long to run (like PBKDF2 with large iteration). Means of detection browsers 
use varies, some measure actual time, others measuring # of statements.

Suggested solution: divide up crypto operations into smaller units and run each 
unit through a callback argument. With browsers, callback can be implemented 
using setTimeout or Web worker API. With Node.js, callback can call 
process.nextTick.

Original issue reported on code.google.com by [email protected] on 7 Mar 2011 at 12:34

cannot load MD5 and SHA-1 in the same page

What steps will reproduce the problem?
1. in an HTML file, include scripts/crypto-md5/crypto-md5.js (from the 
latest downloadable zip file)
2. also include scripts/crypto-sha1/crypto-sha1.js
3. the Crypto.MD5 function will not be available (you get an error if you 
try to use it)
4. remove scripts/crypto-sha1/crypto-sha1.js
5. the Crypto.MD5 function is now available

What is the expected output? What do you see instead?
I expect to be able to use both the Crypto.MD5 and Crypto.SHA1 (and 
Crypto.SHA256)  in the same page.

What version of the product are you using? On what operating system?
crypto-js 2.0.0
OS is Linux (Ubuntu 9.10)
Browser = Firefox 3.5.8

Please provide any additional information below.
It seems crypto-sha1.js overwrites the Crypto object, thus removing the 
Crypto.MD5 function
This is probably true for all the Crypto.* methods

Original issue reported on code.google.com by [email protected] on 9 Apr 2010 at 4:43

Google Chrome Dev Channel doesn't work

What steps will reproduce the problem?

Use the latest Chrome dev (6.0.495.0)

Call:
Crypto.util.bytesToBase64(Crypto.HMAC(Crypto.SHA1, "GA", "GA", {asBytes: true}))

What is the expected output? What do you see instead?

Expected: bBg1Ebw0ajGh8E47JCjrZ63PdKI=

Instead I see: o4iKvmV1Ahll2gbgpSLys/9e5pY=

What version of the product are you using? On what operating system?

Chrome  (6.0.495.0) on OSX

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 19 Aug 2010 at 1:44

Testsuite fails with opera 10.53

What steps will reproduce the problem?
1. Start the Testsuite on Opera 10.53

What is the expected output? What do you see instead?

All tests should pass but these are failing

test util.gt: failed.
Value should be true.
Expected: true (boolean)
Actual: false (boolean)

test util.lt: failed.
Value should be true.
Expected: true (boolean)
Actual: false (boolean)

test util.endian: failed.
Values should be equal.
Expected: 4041261184 (number)
Actual: -253706112 (number)

test enc.UTF8.decode: failed.
Values should be equal.
Expected: 1105365410,3465620992 (string)
Actual: 1105365410,-829346304 (string)

test enc.Base64.decode: failed.
Values should be equal.
Expected: 352033795,3648913408 (string)
Actual: 352033795,-646053888 (object)

test types.WordArray.concat: failed.
Values should be equal.
Expected: 4294967295 (string)
Actual: -1 (string)

test SHA256: failed.
Values should be equal.
Expected: f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650 
(string)
Actual: 8a19c396a89853b8baf0050e3b4dfeb4f19bae586f6b491249a1fe38ff98faa5 
(string)

Opera
Version 10.53
Build 3374
Platform Win32

Original issue reported on code.google.com by [email protected] on 5 Jun 2010 at 2:07

supporting caller provided IV in AES encrypt/decrypt

I needed compatibility with node.js crypto, so I had to hack AES.js to pass IV 
in. At the same time, IV had to be packaged separately and not part of the 
encrypted result.

My modified version of AES.js is attached for your review.

Note that options.iv is assumed to be an array in my version.

Thx.


Original issue reported on code.google.com by [email protected] on 14 Mar 2011 at 9:24

Attachments:

Closure compiler errors and warnings

What steps will reproduce the problem?
1. Replace YUI Compressor with Google Closure compiler
2. See build fail

The following cause errors and/or warnings:

in CBC.js:
while (c.pop() != 0x80) ;

The compiler wants {} instead of ;

in AES.js (twice):
mode = options && options.mode || C.mode.OFB;

The variable mode is not declared.  Prepending "var " to the lines solves this.

Original issue reported on code.google.com by [email protected] on 5 Mar 2011 at 1:07

Binary.stringToBytes produces incorrect results

While using crypto-js we have experienced some problems in converting a byte 
string into a list of integers. We occasionally get values bigger than 0xff. 
Which obviously should not happen when converting a bytestring into integers.

We were able to fix the problem by doing a bitwise AND against 0xff before 
outputting the value (see code below). This seemed to fix the issue for us. We 
feel this might be a bug in the library. In case we got it wrong, we'd like to 
gain better understanding about what is happening.

Crypto.charenc.Binary.stringToBytes = function (str) {
  for (var bytes = [], i = 0; i < str.length; i++) {
    bytes.push(str.charCodeAt(i) & 0xff);
  }
  return bytes;
};

Original issue reported on code.google.com by [email protected] on 18 Jun 2010 at 8:57

MD5 contains all zeros when long string is used

What steps will reproduce the problem?
1. Call Crypto.MD5() with a string larger than 4000 characters

What is the expected output? What do you see instead?
The returned MD5 hash string is the correct length, however every character
is a zero.

What version of the product are you using? On what operating system?
Crypto-JS v1.1.0, Firefox 3.5, Windows XP Pro

Original issue reported on code.google.com by [email protected] on 16 Sep 2009 at 4:04

cbc padding breaks our code

We are trying to decrypt existing AES crypto that uses the CBC mode. The 
problem is that the upper layers always make sure that the plain text is of 
correct length, and thus no padding mechanism is needed from the encryption 
library. crypto-js however, assumes in CBC mode that the data has been padded 
in a specific way.

We are trying to write a library that is compatible with a piece of existing 
software, so we cannot change that software to add a crypto-js compatible 
padding. Also the other way around, while encrypting the data, the padding 
added by crypto-js CBC code might break the original application while it tries 
to decrypt items created by crypto-js.

We were able to work around this by making our own copy of the cbc mode and 
commenting out the padding related code. However we are hoping the library 
would gain an option for disabling the padding.

Original issue reported on code.google.com by [email protected] on 18 Jun 2010 at 9:06

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.