aes icon indicating copy to clipboard operation
aes copied to clipboard

AES.encrypt and AES.decrypt for Ruby

Results 12 aes issues
Sort by recently updated
recently updated
newest added

![image](https://user-images.githubusercontent.com/22616095/143249262-19e0dfa4-0c34-4715-a61d-a8383cbb7f11.png)

Regarding to the issue https://github.com/chicks/aes/issues/17 Error in Ruby 2.5.3, set cipher.key: Exception “key must be 16 bytes" OpenSSL::Cipher.new('AES-128-CBC') only accept key with length is 16 bytes. While in the code,...

``` def _setup(action) @cipher ||= OpenSSL::Cipher.new(@options[:cipher]) # Toggles encryption mode @cipher.send(action) @cipher.padding = @options[:padding] @cipher.key = @key.unpack('a2'*32).map{|x| x.hex}.pack('c'*32) end ``` When i upgrade to ruby 2.5.3, OpenSSL::Cipher required key length...

This gem uses unauthenticated AES-CBC encryption: https://github.com/chicks/aes/blob/master/lib/aes/aes.rb#L126 AES-CBC is not an [authenticated encryption](https://en.wikipedia.org/wiki/Authenticated_encryption) mode and is vulnerable to [chosen ciphertext attacks](https://en.wikipedia.org/wiki/Chosen-ciphertext_attack) including message forgery and potentially plaintext recovery. At the...

Howdy, I was wondering if someone would be able to elaborate on this line: https://github.com/chicks/aes/blob/master/lib/aes/aes.rb#L155. I'm wrapping my head around AES and was confused by the modification of the key...

See https://gist.github.com/kv109/42289aa65f81e819910005f4773215a1

Right now there's only a few test cases in here, and for the most part they just ensure that the `encrypt` and `decrypt` methods roundtrip. There should be quite a...