Code Monkey home page Code Monkey logo

slowaes's People

slowaes's Issues

There is a typo in error messages of strip_PKCS7_padding(): PCKS7 -> PKCS7

def strip_PKCS7_padding(s):
    """return s stripped of PKCS7 padding"""
    if len(s)%16 or not s:
        raise ValueError("String of len %d can't be PCKS7-padded" % len(s))
    numpads = ord(s[-1])
    if numpads > 16:
        raise ValueError("String ending with %r can't be PCKS7-padded" % s[-1])
    return s[:-numpads]


slowaes-0.1a1

Original issue reported on code.google.com by [email protected] on 8 Sep 2012 at 2:58

Test examples for PHP & JS

You need to add some example code. I was straggling with the PHP implementation 
and had lot of problems. In any case the data to be send is not an array, so 
please put down some examples about strings being encrypted and decrypted. I 
personally need a working solution for JavaScript and PHP communicating with 
each-other, but any code explaining the steps to make it work is OK. I can 
contribute some examples myself if I can figure it out.

Original issue reported on code.google.com by [email protected] on 22 Mar 2011 at 11:36

Implement PKCS7 padding

What are the requirement to complete this task?

Implement PKCS7 padding as described on
http://code.google.com/p/slowaes/wiki/OpenSSLStandards

Please use labels and text to provide additional information.

Original issue reported on code.google.com by [email protected] on 6 Aug 2008 at 12:46

trying to create a working output against known config

Hello-

I have a few reference implementations of AES-256-CBC in C#, Ruby, PHP, and 
Flash.

I am know trying to get it to talk to JS via slow aes using the same settings.

I've been toiling for hours trying to get it to work, so I thought I'd ask to 
see if anyone had any ideas.

On a working system, using the following settings:

IV = 0123456789012345
key = 67a4f45f0d1d9bc606486fc42dc49416
plaintext = yay!

Across my reference implementations, I get the following Base64 encoded output:

q/xJqqN6qbiZMXYmiQC1Fw==

I am having trouble setting up slowaes to give me the same. Can anyone give me 
some pointers?

tia

Original issue reported on code.google.com by [email protected] on 14 Nov 2012 at 6:05

Minor syntax errors in cryptoHelpers.js (effects non-browsers)

In
http://slowaes.googlecode.com/svn/trunk/js/cryptoHelpers.js Revision 39.

There is a couple of minor syntax issues (found when running it through JSLint).

The issues don't occur when using it in browser, as the browser auto-fixes them 
for you.

But if you run it in a stricter environment (e.g. Windows Script Component), 
then it complains.

I've attached a patch file. 

btw. Awesome project guys, keep up the good work.


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

Attachments:

bug in CBC implementation of AES OpenSSL-256 encryption

What steps will reproduce the problem?
1. run code in "2." (i am running a gs script in google spreadsheets)
2.
function aesTester() {
  var password = "mypw";
  // generate the private key based on user's input password
  var privateKey = cryptoHelpers.generatePrivateKey(password, 128);

  var myplaintext = "hello plain text";
  // using OPENSSL_256 key size but could use
  var keysize = slowAES.aes.keySize.SIZE_256;
  var mode = slowAES.modeOfOperation.CBC;
  var key = cryptoHelpers.toNumbers("5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8");
  // initialization vector, make this unique and RANDOM!!
  var iv = cryptoHelpers.toNumbers("6bbda7892ad344e06c31e64564a69a9a");
  var plaintext = cryptoHelpers.convertStringToByteArray(myplaintext);
  // keysize is no longer a parameter because it auto finds size
  var encrypted = slowAES.encrypt(plaintext, mode, privateKey, iv);
  var base64 = cryptoHelpers.base64.encode(encrypted);
  // this is the plain text
  Logger.log(myplaintext);
  // this is the encrypted text
  Logger.log(base64);
  // decryption in reverse order of encryption
  var decodedText = cryptoHelpers.base64.decode(base64);
  // keysize is no longer a parameter because it auto finds size
  var decrypted = slowAES.decrypt(decodedText, mode, privateKey, iv);
  var decryptedText = cryptoHelpers.convertByteArrayToString(decrypted);
  // this is the decrypted text
  Logger.log(decryptedText );
}

What is the expected output? What do you see instead?
expected output is the input but you will see an extra character at the end. I 
have tracked the bug down to the "unpadBytesOut" function. it does not remove 
the "=" from the string. should the unpadding be done AFTER the 
decryption??!!?? or should it be removed before. (removing a decrypted "=" 
sounds difficult.)


What version of the product are you using? On what operating system?
not sure, i just copied the code today. running on windows 7. google chrome. 
google docs as a .gs (google script). js code runs as-is.

Please provide any additional information below.
i can try to figure out the fix, but hopefully someone beats me to it.

Original issue reported on code.google.com by [email protected] on 10 Dec 2013 at 7:33

Add License File

What is the expected output? What do you see instead?
A License File checked into the repository


For packaging it would be nice to have a LICENSE file stating a copy of the 
license for the package.

Original issue reported on code.google.com by [email protected] on 7 Feb 2015 at 8:48

Arguments should be array of bytes

What are the requirement to complete this task?

The encrypt and decrypt methods should accept an array of bytes instead of
a string. Any conversion code within the methods should be removed under
the assumption that the conversion will occur before the method is called.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by [email protected] on 6 Aug 2008 at 12:23

Arguments should be array of bytes

What are the requirement to complete this task?

The encrypt and decrypt methods should accept an array of bytes instead of
a string. Any conversion code within the methods should be removed under
the assumption that the conversion will occur before the method is called.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by [email protected] on 6 Aug 2008 at 12:24

error in base64 decoding

What steps will reproduce the problem?

test cases, these should both return the array [97,97]

cryptoHelpers.base64.decode(cryptoHelpers.base64.encode([97,97]))
97,97,64

cryptoHelpers.base64.decode("YWE=")
97,97,64

What do you see instead?
The array: [97,97,64]


What version of the product are you using?
revision 39 from svn, running under Mozilla Rhino

My proposed fix is attached.  After this patch is applied:

js> cryptoHelpers.base64.decode(cryptoHelpers.base64.encode([97,97]))
97,97

js> cryptoHelpers.base64.decode("YWE=")
97,97

Original issue reported on code.google.com by [email protected] on 10 Jun 2011 at 10:22

Attachments:

Implement PKCS7 padding

What are the requirement to complete this task?

Implement PKCS7 padding as described on
http://code.google.com/p/slowaes/wiki/OpenSSLStandards

Please use labels and text to provide additional information.

Original issue reported on code.google.com by [email protected] on 6 Aug 2008 at 12:45

Unable to decrypt a message if the unencrypted text is not known

If you take the encrypted cipher resulting from any CBC operation and
decrypt the message using the same IV, key, key size, etc, the decrypted
string is longer than expected and results in gremlins being appended to
the end of the decrypted text.

SlowAES seems to only work in a round-trip scenario where the unencrypted
text is known at the time.

Using Josh Davis' implementation, you can see the issue first hand:

http://josh-davis.org/ecmaScrypt

Password: Test001!
256 Bit
Hex Key: e8cfe0b4e39dcc886ca83116b21db375ca231eeebf1df98f0b38163221385fcd
CBC
Encrypted String:
88ff1654ef2badfc22bc7dfa6c0d5d145cbfa547bce4d87c663473b09ce8d9c3

The result you will get is 'Hello, World! This is a test' but at the end
there will be extra characters at the end.

I tried using the fix submitted here:
http://code.google.com/p/slowaes/issues/detail?id=6

which works correctly unless I pass in a 16 character hex string as the
plain text.

Original issue reported on code.google.com by [email protected] on 12 Feb 2010 at 7:35

IV problem

What steps will reproduce the problem?
1. Create an encrypted data with static KEY and IV
2. Once you try to decrypt the data with the same KEY and different IV the 
message is displayed and only the first line is scrambled

What is the expected output? What do you see instead?
I was expecting that once the IV is changed the whole message will be scrambled 
but instead it is only the first line

What version of the product are you using? On what operating system?
The last version available for download.

Original issue reported on code.google.com by [email protected] on 5 Dec 2012 at 9:02

__main__ example too short for block sequencing test

Small point.  Your test code has a length of 15 characters, fitting in a single 
block, so your example does not test the block sequencing methods at all.

How about a text string:

"This is a test with several blocks!"


Original issue reported on code.google.com by [email protected] on 29 Sep 2010 at 9:40

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.