summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2013q3/000690.html
blob: 33ef5ccf3515c6bf256b66f405ee8da544eabbec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [pycrypto] Crypto question
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20Crypto%20question&In-Reply-To=%3CCAGfyce3pW5PRsS7OfH7XnpX-ptDSFb5O679KfQQEw%2B8S5QjRGg%40mail.gmail.com%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <style type="text/css">
       pre {
           white-space: pre-wrap;       /* css-2.1, curent FF, Opera, Safari */
           }
   </style>
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="000689.html">
   <LINK REL="Next"  HREF="000691.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[pycrypto] Crypto question</H1>
    <B>Legrandin</B> 
    <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20Crypto%20question&In-Reply-To=%3CCAGfyce3pW5PRsS7OfH7XnpX-ptDSFb5O679KfQQEw%2B8S5QjRGg%40mail.gmail.com%3E"
       TITLE="[pycrypto] Crypto question">helderijs at gmail.com
       </A><BR>
    <I>Mon Aug  5 13:26:55 PDT 2013</I>
    <P><UL>
        <LI>Previous message: <A HREF="000689.html">[pycrypto] Crypto question
</A></li>
        <LI>Next message: <A HREF="000691.html">[pycrypto] Failed test compiling on Fedora 19
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#690">[ date ]</a>
              <a href="thread.html#690">[ thread ]</a>
              <a href="subject.html#690">[ subject ]</a>
              <a href="author.html#690">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>Hi Leon,

It's clear from section 9.1.1 of RFC3444 (EMSA-PSS-ENCODE function),
where the encoded value is called EM.

&gt;<i>From step 12:
</I>len(EM) = len(maskedDB) + len(hash) + len(0xBC)
            = len(maskedDB) + len(hash) + 1

&gt;<i>From step 10:
</I>len(EM) = len(DB) + len(hash) + 1

&gt;<i>From step 8:
</I>len(EM) = len(PS) + len(0x01) + len(salt) + len(hash) + 1
            = len(PS) + len(salt) + len(hash) + 2

And finally from step 7 it must be that:
len(EM) &gt;= len(salt) + len(hash) + 2


&gt;<i> In PKCS_PSS.py @ 254: A value of 2 is added. Why 2?
</I>&gt;<i>
</I>&gt;<i> This came up when I was testing Sign/Verify using RSA1024 and SHA512
</I>&gt;<i> combination.
</I></PRE>




<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000689.html">[pycrypto] Crypto question
</A></li>
	<LI>Next message: <A HREF="000691.html">[pycrypto] Failed test compiling on Fedora 19
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#690">[ date ]</a>
              <a href="thread.html#690">[ thread ]</a>
              <a href="subject.html#690">[ subject ]</a>
              <a href="author.html#690">[ 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>