diff options
Diffstat (limited to 'pipermail/pycrypto/2010q4/000337.html')
-rw-r--r-- | pipermail/pycrypto/2010q4/000337.html | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/pipermail/pycrypto/2010q4/000337.html b/pipermail/pycrypto/2010q4/000337.html new file mode 100644 index 0000000..89a1734 --- /dev/null +++ b/pipermail/pycrypto/2010q4/000337.html @@ -0,0 +1,129 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [pycrypto] Create a Digital Signature (DER Encoded PKCS#1) - SHA1withRSA + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Create%20a%20Digital%20Signature%20%28DER%20Encoded%20PKCS%231%29%20-%0A%09SHA1withRSA&In-Reply-To=4D1A4272.5080002%40gmx.li"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000335.html"> + <LINK REL="Next" HREF="000340.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[pycrypto] Create a Digital Signature (DER Encoded PKCS#1) - SHA1withRSA</H1> + <B>Anurag Chourasia</B> + <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20Create%20a%20Digital%20Signature%20%28DER%20Encoded%20PKCS%231%29%20-%0A%09SHA1withRSA&In-Reply-To=4D1A4272.5080002%40gmx.li" + TITLE="[pycrypto] Create a Digital Signature (DER Encoded PKCS#1) - SHA1withRSA">anurag.chourasia at gmail.com + </A><BR> + <I>Tue Dec 28 14:14:18 CST 2010</I> + <P><UL> + <LI>Previous message: <A HREF="000335.html">[pycrypto] Create a Digital Signature (DER Encoded PKCS#1) - SHA1withRSA +</A></li> + <LI>Next message: <A HREF="000340.html">[pycrypto] Create a Digital Signature (DER Encoded PKCS#1) - SHA1withRSA +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#337">[ date ]</a> + <a href="thread.html#337">[ thread ]</a> + <a href="subject.html#337">[ subject ]</a> + <a href="author.html#337">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Hi Thorsten, + +Thanks for the response. + +It wasn't for Home Work :-) + +I went through some examples and I understand that to achieve my goal i have +to do two things. + +1. Compute the Hash Value of my Data. +2. Sign the computed Hash Value with my Private Key. + +To achieve 1 above, i believe that the following code will help me (assuming +that data is ABC). + +from Crypto.Hash import SHA +m = SHA.new() +m.update('ABC') + +What I am not sure is if I should use + +m.digest() +or +m.hexdigest() as the computed hash value. + +Following this, how can i use Crypto again to Sign the computed Hash Value +using the Private Key? + +Appreciate your help on this. + +Regards, +Anurag + +On Wed, Dec 29, 2010 at 1:32 AM, Thorsten Behrens <<A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">sbehrens at gmx.li</A>> wrote: + +><i> On 12/28/2010 2:44 PM, Anurag Chourasia wrote: +</I>><i> > +</I>><i> > I have a Private key and Public Key which comes in an XML in the +</I>><i> > following form. +</I>><i> [..] +</I>><i> > Could you please let me know how I could use Crypto to meet this +</I>><i> > requirement. Appreciate if you could help me with a simple code snippet. +</I>><i> > +</I>><i> +</I>><i> Is this homework? :) +</I>><i> +</I>><i> If so, I'd give you a hint: Take a good look at the test routines in +</I>><i> Crypto/Selftest, they are examples of how to use the library. +</I>><i> +</I>><i> Thorsten +</I>><i> +</I>><i> _______________________________________________ +</I>><i> pycrypto mailing list +</I>><i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">pycrypto at lists.dlitz.net</A> +</I>><i> <A HREF="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto</A> +</I>><i> +</I>-------------- next part -------------- +An HTML attachment was scrubbed... +URL: <A HREF="http://lists.dlitz.net/pipermail/pycrypto/attachments/20101229/c9dade59/attachment.htm">http://lists.dlitz.net/pipermail/pycrypto/attachments/20101229/c9dade59/attachment.htm</A> +</PRE> + + + + + + + + + + + + + + + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000335.html">[pycrypto] Create a Digital Signature (DER Encoded PKCS#1) - SHA1withRSA +</A></li> + <LI>Next message: <A HREF="000340.html">[pycrypto] Create a Digital Signature (DER Encoded PKCS#1) - SHA1withRSA +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#337">[ date ]</a> + <a href="thread.html#337">[ thread ]</a> + <a href="subject.html#337">[ subject ]</a> + <a href="author.html#337">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">More information about the pycrypto +mailing list</a><br> +</body></html> |