RSA signature verification fails with mbedtls and openssl against signature generated from libtomcrypt

51 views
Skip to first unread message

dam...@chirp.io

unread,
Apr 11, 2019, 4:46:23 AM4/11/19
to LibTom Projects
Hi,

I already created an issue on StackOverflow (https://stackoverflow.com/questions/55613950/rsa-signature-verification-failing-with-libtomcrypt) but haven't had any answer yet so I will make it short on here :)

My issue is that a signature generated with libtomcrypt fails to be verified by either mbedtls or openssl. I would like to know if it's a bug with my code or a bug from libtomcrypt, which would really surprise me.

Thank you !
Damien

Steffen Jaeckel

unread,
Apr 11, 2019, 6:00:30 AM4/11/19
to lib...@googlegroups.com, dam...@chirp.io
I took the liberty to reply on SO.

For all of you who don't want to go there... Damien forgot to hash the
input before calling `rsa_sign_hash()`

It's true that this point isn't explicitly stated in the documentation
that "you probably have to hash the data before passing it in", so this
could be improved.


Cheers,
Steffen
> --
> *** Please reply-to-all at all times ***
> *** (do not pretend to know who is subscribed and who is not) ***
> *** Please avoid top-posting. ***
> ---
> You received this message because you are subscribed to the Google
> Groups "LibTom Projects" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to libtom+un...@googlegroups.com
> <mailto:libtom+un...@googlegroups.com>.
> To post to this group, send email to lib...@googlegroups.com
> <mailto:lib...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/libtom.
> For more options, visit https://groups.google.com/d/optout.

--
Steffen Jaeckel - s_ja...@gmx.de
GnuPG fingerprint: C438 6A23 7ED4 3A47 5541 B942 7B2C D0DD 4BCF F59B
My OTR key has changed on 30. Sept. 2015!
jabber: jae...@jabber.ccc.de 93BA97FA F3702AB7 DCBEB7C7 291DB383 284996CB

dam...@chirp.io

unread,
Apr 11, 2019, 7:37:31 AM4/11/19
to LibTom Projects
Hi Steffen,

I validated your answer on SO as it fixed the issue. I repeat myself but my bad, I misread the documentation.

Thanks for your quick support !
Damien
Reply all
Reply to author
Forward
0 new messages