Hello :)
I just wanted to say hi, and announce the availability of bindings for the Rust programming language.
As it is idiomatic for bindings to foreign code, there are two packages.
First, there is the almost completely autogenerated crate (crate is Rust-lingo for library) 'nettle-sys', which merely exposes the C API without any language-specific wrapping.
https://crates.io/crates/nettle-sys
Second, there is the 'nettle' crate, which adds an idiomatic and safe interface on top of the former crate.
https://crates.io/crates/nettle
For some context, we are working on a new OpenPGP implementation in Rust, called Sequoia-PGP.
When we started the project, we evaluated cryptographic libraries, and decided that Nettle would be the best fit for us, even if it involved creating language bindings first. Looking back after one and a half years, we're still happy with our choice. So let me express our gratitude for everyone who is or has been working on Nettle!
Cheers, Justus
Justus Winter justus@sequoia-pgp.org writes:
When we started the project, we evaluated cryptographic libraries, and decided that Nettle would be the best fit for us, even if it involved creating language bindings first. Looking back after one and a half years, we're still happy with our choice. So let me express our gratitude for everyone who is or has been working on Nettle!
Thanks!
Have you looked at nettle's pgp.h? This code is not really in a useful state. It aims to be able to write out a public RSA key in openpgp format, and doesn't quite succeed at that. Do you think it would be useful with some level of pgp-support in the Nettle library?
Regarding the Rust bindings, what's the best place to point other Rust users? https://crates.io/crates/nettle, or https://sequoia-pgp.gitlab.io/nettle-rs/nettle/, or somewhere else?
Regards, /Niels
nisse@lysator.liu.se (Niels Möller) writes:
Have you looked at nettle's pgp.h?
No.
This code is not really in a useful state. It aims to be able to write out a public RSA key in openpgp format, and doesn't quite succeed at that.
Well, a key packet on its own is not useful, you also need signature packets and userid packets to form a useful OpenPGP Transferable Public Key.
Do you think it would be useful with some level of pgp-support in the Nettle library?
I don't know. That depends on the use case. The most basic operation that I can think of would be signature verification, and even that requires the ability to correctly canonicalize TPKs, which is somewhat involved. Encryption and safe decryption requires streaming, consumption of arbitrary OpenPGP messages requires decompression support, it just goes on and on...
Regarding the Rust bindings, what's the best place to point other Rust users? https://crates.io/crates/nettle, or https://sequoia-pgp.gitlab.io/nettle-rs/nettle/, or somewhere else?
https://crates.io/crates/nettle is the preferred place to point downstream users to. Thanks!
Niels Möller. PGP-encrypted email is preferred. Keyid 368C6677.
Nitpick: You have a short KeyID in your signature.
Cheers, Justus
Justus Winter justus@sequoia-pgp.org writes:
Regarding the Rust bindings, what's the best place to point other Rust users? https://crates.io/crates/nettle, or https://sequoia-pgp.gitlab.io/nettle-rs/nettle/, or somewhere else?
https://crates.io/crates/nettle is the preferred place to point downstream users to. Thanks!
Do we need to do anything else to be listed on https://www.lysator.liu.se/~nisse/nettle/ ?
Thanks, Justus
Justus Winter justus@sequoia-pgp.org writes:
Do we need to do anything else to be listed on https://www.lysator.liu.se/~nisse/nettle/ ?
If you want to make it really easy for me, please send a patch, the file on the web should be a straight copy of https://git.lysator.liu.se/nettle/nettle/blob/master/index.html
Regards, /Niels
From: Justus Winter justus@sequoia-pgp.org
--- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/index.html b/index.html index 3ac9d7eb..df174bbd 100644 --- a/index.html +++ b/index.html @@ -50,18 +50,18 @@ uid Niels Möller <nisse@lysator.liu.se> <p> I'm aware of nettle-bindings for the following higher-level languages.</p> <dl> + <dt> <a href='http://hackage.haskell.org/package/bindings-nettle'>Haskell</a> </dt> + <dd> Haskell bindings by Clint Adams. </dd> + <dt> <a href='http://search.cpan.org/~dkg/Crypt-Nettle-0.3/lib/Crypt/Nettle.pm'>Perl</a></dt> + <dd> Crypt::Nettle module, by Daniel Kahn Gillmor.</dd> <dt> <a href="http://pike.ida.liu.se">Pike</a></dt> <dd> An object-oriented interpreted language with C-like syntax. Nettle bindings are included with the official distribution.</dd> - <dt> <a href='http://search.cpan.org/~dkg/Crypt-Nettle-0.3/lib/Crypt/Nettle.pm'>Perl</a></dt> - <dd> Crypt::Nettle module, by Daniel Kahn Gillmor.</dd> <dt> <a href='http://www.yellowbank.com/code/PostgreSQL/y_crypto/'>PostgreSQL</a></dt> <dd> Bindings for the Postgres database, by Ron Peterson. </dd> <dt> <a href='http://marcomaggi.github.com/nausicaa.html'>R6RS Scheme</a></dt> <dd> Scheme bindings by Marco Maggi, supporting multiple R6RS implementations.</dd> - <dt> <a href='http://hackage.haskell.org/package/bindings-nettle'>Haskell</a> </dt> - <dd> Haskell bindings by Clint Adams. </dd> <dt> TCL </dt> <dd> Included in the chiark-tcl debian package by Ian Jackson (not sure if/how it's distributed outside of debian). </dd>
From: Justus Winter justus@sequoia-pgp.org
--- index.html | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/index.html b/index.html index df174bbd..c90db93e 100644 --- a/index.html +++ b/index.html @@ -62,6 +62,8 @@ uid Niels Möller <nisse@lysator.liu.se> <dt> <a href='http://marcomaggi.github.com/nausicaa.html'>R6RS Scheme</a></dt> <dd> Scheme bindings by Marco Maggi, supporting multiple R6RS implementations.</dd> + <dt> <a href='https://crates.io/crates/nettle'>Rust</a> </dt> + <dd> Rust bindings by Kai Michaelis. </dd> <dt> TCL </dt> <dd> Included in the chiark-tcl debian package by Ian Jackson (not sure if/how it's distributed outside of debian). </dd>
nisse@lysator.liu.se (Niels Möller) writes:
Justus Winter justus@sequoia-pgp.org writes:
Do we need to do anything else to be listed on https://www.lysator.liu.se/~nisse/nettle/ ?
If you want to make it really easy for me, please send a patch, the file on the web should be a straight copy of https://git.lysator.liu.se/nettle/nettle/blob/master/index.html
I didn't know that, thanks.
Btw, I just noticed that the links to the Pike, PostgreSQL, and R6RS Scheme bindings are dead.
Justus
Justus Winter justus@sequoia-pgp.org writes:
If you want to make it really easy for me, please send a patch, the file on the web should be a straight copy of https://git.lysator.liu.se/nettle/nettle/blob/master/index.html
I didn't know that, thanks.
Patches applied, thanks!
Btw, I just noticed that the links to the Pike, PostgreSQL, and R6RS Scheme bindings are dead.
Pike is alive, I've updated the link. The Postgres and scheme bindings, I don't know, anyone else?
Regards, /Niels
nettle-bugs@lists.lysator.liu.se