Skip to content

Releases: Hinaser/jscrypto

v1.0.3

12 Jan 13:36
Compare
Choose a tag to compare

Fixed

  • Fixed an issue where AES-CCM got wrong MAC while payload padding required

v1.0.2

07 Jul 18:08
d81d460
Compare
Choose a tag to compare

Fixed

  • Fixed an issue where invalid Hex string could be parsed without error.
    For example, invalid Hex string 1g was recognized as 0x01.

v1.0.1

19 Jun 15:22
bedb7ab
Compare
Choose a tag to compare

Fixed

  • Fixed an issue where building jscrypto with webpack shows warning messages like below:
    Critical dependency: the request of a dependency is an expression

v1.0.0

21 Apr 16:27
4bbc972
Compare
Choose a tag to compare

Added

Changed

Small breaking change

  • Pass initializing vector as Word32Array to constructor of BlockCipherMode instead of just a 32bit number array.
    *This may enable developers to use non-32bit-aligned iv value to block cipher mode in future release.
    *This change may not be breaking lib compatibility unless developers directly instantiate BlockCipherMode or
    creating original BlockCipherMode extending old BlockCipherMode class.
    // BEFORE
    const gcm = new GCM({cipher: AES, iv: [0x11223344]});
    
    // AFTER
    const gcm = new GCM({cipher: AES, iv: new Word32Array([0x11223344], 4)});

Breaking change

  • Changed GMAC hash function name from GCM.hash() to GCM.mac().
  • Calculating authTag in GCM now requires developer to manually call authTag function.
    Encryption/Decryption and MAC Generation are now calculated independently.
    //////////////////////
    // AES-GCM
    //////////////////////
    // BEFORE
    const encrypted = AES.encrypt(msg, key, { iv, mode: GCM, padding: NoPadding, authData });
    encrypted.authTag !== undefined; // This returns true. authTag is automatically calculated on encryption.
    
    // AFTER
    const encrypted = AES.encrypt(msg, key, { iv, mode: GCM, padding: NoPadding, authData });
    encrypted.authTag === undefined; // This returns true. authTag must be manually calculated as below.
    const authTag = GCM.mac(AES, key, iv, authData, encrypted.cipherText);

v0.2.0

06 Apr 15:20
a6af681
Compare
Choose a tag to compare

Added

  • Added GCM block cipher mode. (Galois Counter Mode)
  • Added GMAC (Galois Message Authentication Code)

v0.1.0

30 Mar 14:24
5883943
Compare
Choose a tag to compare

Added

  • Added CLI executable
  • Added HmacSHA1 (jscrypto/HmacSHA1, jscrypto/es6/HmacSHA1)

v0.0.2

28 Mar 08:30
f1f238d
Compare
Choose a tag to compare

Changed

  • Removed typescript source file from npm package to reduce package size.
  • Word32Array can be initialized/cloned by new Word32Array(anotherWord32Array).

Fixed

  • Added missing kdf modules(jscrypto/EvpKDF, jscrypto/PBKDF2, jscrypto/OpenSSLKDF).

v0.0.1

23 Mar 12:14
c75d77d
Compare
Choose a tag to compare

Fixed

  • Fixed an issue where encoder/kdf modules have the different loading path.
    <!-- BEFORE THIS FIX -->
    <!-- Load from index.js -->
    <script src="dist/index.js"></script>
    var word = JsCrypto.Hex.parse("00112233");
    <!-- Load from individual modules -->
    <script src="dist/encoder/Hex.js"></script>
    var word = JsCrypto.encode.Hex.parse("00112233");
    
    <!-- AFTER THIS FIX -->
    <script src="dist/Hex.js"></script>
    var word = JsCrypto.Hex.parse("00112233");
  • Fixed an issue where loading multiple modules in browser only preserves the last module.
    <script src="dist/AES.js"></script>
    <script src="dist/DES.js"></script>
    // OK
    var word1 = JsCrypto.DES.encrypt("message", "key");
    // ERROR
    var word2 = JsCrypto.AES.encrypt("message", "key");

v0.0.0

21 Mar 10:26
d6cf3f3
Compare
Choose a tag to compare

Initial release