help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-gnutls] Re: Signature Verify functions


From: Simon Josefsson
Subject: [Help-gnutls] Re: Signature Verify functions
Date: Wed, 02 Apr 2008 12:01:24 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

Juan Pablo Ugarte <address@hidden> writes:

> Hello guys.
>
> I need a function to verify a little text using a public key.
>
> Its for a GPL project, i only need to verify some text and I can not add
> gnutls as a dependancy because its just for an easter egg :)
>
> hehe, anyways i just want to implement something like this...
>
> int
> verify_sign (pubkey, text, sign);
>
> Can anyone give me some pointers on wich files/functions should i "look"
> to implement such function?

Assuming you don't want the overheads of X.509 or OpenPGP, you should
look into libgcrypt which is the low-level crypto library.  It supports
signing and verification of RSA signatures.  If you have a bignum math
library available, writing a simple (and insecure) RSA verifier
shouldn't be that tricky.  It may be easier than trying to understand
the libgcrypt code and extract the necessary functions (which will
include the MPI code which is messy).

Of course, don't expect it to be secure (that's why we have the X.509
and OpenPGP umbrellas) but for an easter egg I guess that isn't a
priority.

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]