Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL::Cipher missing auth_data= #3376

Closed
trashhalo opened this issue Oct 8, 2015 · 4 comments
Closed

OpenSSL::Cipher missing auth_data= #3376

trashhalo opened this issue Oct 8, 2015 · 4 comments

Comments

@trashhalo
Copy link

Ruby 2.2 defines a method on Cipher with the signature auth_data=
http://ruby-doc.org/stdlib-2.2.2/libdoc/openssl/rdoc/OpenSSL/Cipher.html#method-i-auth_data-3D

jruby is bombing on our test suite with (9.0.1.0)
NoMethodError: undefined method auth_data=' for #OpenSSL::Cipher:0x1ed38b74`

Looks like this method was added in ruby 2 and is missing in 1.9

http://ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/Cipher.html
vs
http://ruby-doc.org/stdlib-2.0.0/libdoc/openssl/rdoc/OpenSSL/Cipher.html

@saghaulor
Copy link

+1 bump

I'm trying to add support to AEAD to attr-encrypted/encryptor#18 and the JRuby build is failing because of the lack of auth_data= support.

I'd like to maintain JRuby support but I may have to remove it until this feature is supported.

saghaulor added a commit to saghaulor/encryptor that referenced this issue Dec 27, 2015
- These Ruby versions do not support Authentication Data.
- MRI 1.9.3 is EOL, so we'll stop supporting it.
- There is an existing issue opened with JRuby regarding support for
  'auth_data='. jruby/jruby#3376 When it is
  addressed we can reintroduce JRuby support.
saghaulor added a commit to saghaulor/encryptor that referenced this issue Dec 27, 2015
- These Ruby versions do not support Authentication Data.
- MRI 1.9.3 is EOL, so we'll stop supporting it.
- There is an existing issue opened with JRuby regarding support for
  'auth_data='. jruby/jruby#3376 When it is
  addressed we can reintroduce JRuby support.
@nahi
Copy link
Member

nahi commented Jan 1, 2016

Yeah I once tried to fix jruby-openssl but so far I don't have enough time to do that. FYI w/r/t AES-GCM on JRuby you can do that like this: https://github.com/nahi/ruby-crypt/blob/master/odrk05/kms_encryptor.rb

@saghaulor
Copy link

@nahi Thanks for the suggestion. From my understanding of the code that you provided, authentication data is not supported, only authenticated encryption. However, based on https://tools.ietf.org/html/rfc5084#section-1.5, AES-GCM accepts authentication data as optional input. As such your suggestion would work, though wouldn't be ideal.

It seems though that JRuby 1.7 doesn't support AES-GCM.

@kares
Copy link
Member

kares commented Jan 19, 2017

has been added at some point in jruby-openssl 0.9.1x releases. pls report at JRuby-OpenSSL if otherwise.

@kares kares closed this as completed Jan 19, 2017
@kares kares added this to the Invalid or Duplicate milestone Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants