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

Add compatibility tests with other OpenPGP implementations #1018

Open
ronaldtse opened this issue Dec 30, 2019 · 7 comments
Open

Add compatibility tests with other OpenPGP implementations #1018

ronaldtse opened this issue Dec 30, 2019 · 7 comments
Assignees

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Dec 30, 2019

We need to create test suites to test rnp functionality with other OpenPGP implementations and versions, such as:

  • GnuPG
  • Enigmail
  • Sequoia
  • etc.

Specifically we need to test key import/export, signing/verification and encryption/decryption.

I remember Sequoia has a compatibility test suite we could take inspiration from.

This task probably needs to be split into smaller tasks.

@teythoon
Copy link

We'd like to invite you to join our testing effort. The OpenPGP Interoperability Test Suite allows us to write tests once, and test any number of OpenPGP implementations at the same time with no additional effort. The results and pointers to the code are here: https://tests.sequoia-pgp.org/

Currently, there is a custom driver for RNP in the test suite. RNP was one of the first implementations we included in the test results, and the glue code predates the Stateless OpenPGP Command-Line Interface (https://gitlab.com/dkg/openpgp-stateless-cli) that we use now to drive most implementations. A native implementation of SOP using RNP would be really helpful so that we can get rid of the legacy RNP driver.

I just updated RNP and noticed a minor problem impacting the test suite: #1209

@func0der
Copy link

I do not know, if I should open up a new bug for this, because my problem is related to this.

I created a EDDSA + X25519 keypair in RNP and tried to use the private key with gpg (GnuPG) 2.2.19/libgcrypt 1.8.5 which either fails with a bad passphrase or bad secret key.

I tried:

  1. Created a key with rnpkeys
    Then:
  2. Exporting the private key with rnpkeys
  3. Importing it to gpg. -> Bad secret key, but it got somehow imported
    or
  4. Use the keystore (pubring.gpg + secring.gpg) directly with gpg -> bad passphrase on export of private key, But displaying worked fine.

Should I open a dedicated but report?

@nwalfield
Copy link

@func0der: Could you provide an example? (The exported private key, and the otherwise empty secring.gpg.) Thanks.

@func0der
Copy link

func0der commented Jan 17, 2021

I tried to create a docker.sh file that could simulate the problem, but CentOS 7 has such an outdated libgcrypt version, that gpg does not support elliptic curves yet.
So you have to try it the manual way, sorry.

Commands ran:

export keydir=/tmp
rnpkeys --version -> rnp 0.12.0
rnpkeys --generate-key --expert --userid=foo@bar.de --homedir=${keydir} 
  -> Choose (22) EDDSA + X25519
  -> Passphrase: test123
rnpkeys --export-key --userid foo@bar.de --secret --homedir=${keydir}
(output in attached file `foo@bar.de.asc`)

privkey+secring.gpg.zip

@ronaldtse
Copy link
Contributor Author

Thanks @func0der for the report! I've copied this particular issue over to #1383, we will deal with it there.

@ni4
Copy link
Contributor

ni4 commented Jan 17, 2021

Thank for reporting! This is actually an issue of the GnuPG, I reported it some time ago: https://dev.gnupg.org/T5114

@teythoon
Copy link

teythoon commented Feb 8, 2021

I just wanted to mention that I have implemented a SOP frontend for RNP. It uses RNP's library interface.

https://gitlab.com/sequoia-pgp/rnp-sop/

I implemented it so that I can use it in the OpenPGP interoperability test suite. RNP was the only implementation left that had a custom driver, and I wanted to get rid of the custom driver, so that I can better utilize the SOP interface. I'd be thrilled if you would build a SOP frontend of your own, but will use my implementation in the mean time.

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

6 participants