question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug report: AES 256 CTR wrong encrypt/decrypt

See original GitHub issue

With version v9.0.0 if you encrypt/decrypt a file with:

  • AES-256
  • Mode: CTR
  • Input/Output: RAW
  • Key/IV: HEX the output file has a wrong size (more byte/Mbyte) and it is not encrypted correctly. With version v8.38.2, with the same file and configuration, all work fine.

To Reproduce Configuration:

[
  { "op": "AES Encrypt",
    "args": [{ "option": "Hex", "string": "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4" }, { "option": "Hex", "string": "f0f1f2f3f4f5f6f7f8f9fafb00000000" }, "CTR", "Raw", "Raw"] }
]

Input file: text file with 16byte (es: “1234567890123456”)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
j433866commented, Jul 10, 2019

This has been fixed in version 9.0.1. It was caused by the File API converting strings to UTF-8, so to fix this we now only pass data to the File API as an ArrayBuffer.

1reaction
n1474335commented, Jul 10, 2019

Ok, I can confirm that the downloaded file is incorrect. Thanks for raising this, I’ll see what the problem is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

openssl_decrypt - Manual - PHP
Emits an E_WARNING level error if an unknown cipher algorithm is passed via the cipher_algo ... algorithm'));// for example you algorithm = 'AES-256-CTR'...
Read more >
AES256 decryption in iOS - tutoria… | Apple Developer Forums
Hello, I am looking for a *** tutorial/sample code*** for adding functionality of AES 256 decrytion/encryption into ios 13 app using swift 4+....
Read more >
SubtleCrypto.encrypt() - Web APIs | MDN
A digest of the label is part of the input to the encryption operation. ... A string indicating the name of the algorithm:...
Read more >
AES Encrypt / Decrypt - Examples
The first example below will illustrate a simple password-based AES encryption (PBKDF2 + AES-CTR) without message authentication (unauthenticated ...
Read more >
Encrypt & Decrypt Files With Password Using OpenSSL
HowTo: Encrypt a File ; enc, Encoding with Ciphers ; -aes-256-cbc, The encryption cipher to be used ; -salt, Adds strength to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found