Page MenuHome GnuPG
Feed Advanced Search

Yesterday

svuorela added a comment to T8108: Gpgmepp getrandom zbase32 code has zero byte at the end.

I came from it with stuffing the vector into a QByteArrayView - and then comparing it with the same string being roundtripped thru a copy/paste operation by the user.

Tue, Feb 17, 2:46 PM · Documentation, gpgmepp, Bug Report
ikloecker added a comment to T8108: Gpgmepp getrandom zbase32 code has zero byte at the end.

I explicitly keep the null byte so that you can simply pass the (pointer to the data of the) vector of bytes to the std::string c'tor. Meh! The c'tor wants const char *, but the vector is const unsigned char * so that one has to reinterpret_cast.

Tue, Feb 17, 1:58 PM · Documentation, gpgmepp, Bug Report
svuorela added a comment to T8108: Gpgmepp getrandom zbase32 code has zero byte at the end.

I don't think the trailing zero-byte should survive the conversion to c++ datastructures.

Tue, Feb 17, 10:37 AM · Documentation, gpgmepp, Bug Report
ikloecker closed T8108: Gpgmepp getrandom zbase32 code has zero byte at the end as Resolved.

I have documented the function. The documentation is essentially a copy of the documentation of gpgme_op_random_bytes which should make clear that the function essentially behaves like gpgme_op_random_bytes (except that the gpgmepp function creates a buffer instead of taking one).

Tue, Feb 17, 10:32 AM · Documentation, gpgmepp, Bug Report
ikloecker added a project to T8108: Gpgmepp getrandom zbase32 code has zero byte at the end: Documentation.
Tue, Feb 17, 10:04 AM · Documentation, gpgmepp, Bug Report
ikloecker added a comment to T8108: Gpgmepp getrandom zbase32 code has zero byte at the end.

I guess it would have been better gpgmepp API to add an additional function for getting 30 zbase32 bytes and to omit the mode flag in the generateRandomBytes function instead of mirroring the API of gpgme.

Tue, Feb 17, 10:03 AM · Documentation, gpgmepp, Bug Report
ikloecker added a comment to T8108: Gpgmepp getrandom zbase32 code has zero byte at the end.

I don't consider this a bug in gpgmepp's code. gpgmepp behaves exactly like gpgme (because it simply calls gpgme_op_random_bytes after creating a buffer of the requested size). With zbase32 you get 30 bytes zbase32 code and, if you requested more bytes, you get uninitialized additional bytes (which happen to be nullbytes, but that's more accidental than intentional). If anything then the problem is that gpgmepp's API is in general un(der)documented.

Tue, Feb 17, 9:56 AM · Documentation, gpgmepp, Bug Report
gniibe claimed T7875: GnuPG: Deletion of kyber key fails.
Tue, Feb 17, 8:48 AM · Bug Report, PQC, gnupg26