summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/2012q2/000597.html
blob: 5f8a38d0e9e5b31f3c849e228e1d58b7b2e06734 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
 <HEAD>
   <TITLE> [pycrypto] PyCrypto Blowfish CFB limitation
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20PyCrypto%20Blowfish%20CFB%20limitation&In-Reply-To=%3C91453013-DF53-4CF3-A8C0-7C09220317CB%40dell.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="000596.html">
   <LINK REL="Next"  HREF="000598.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[pycrypto] PyCrypto Blowfish CFB limitation</H1>
    <B>Paul_Koning at Dell.com</B> 
    <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20PyCrypto%20Blowfish%20CFB%20limitation&In-Reply-To=%3C91453013-DF53-4CF3-A8C0-7C09220317CB%40dell.com%3E"
       TITLE="[pycrypto] PyCrypto Blowfish CFB limitation">Paul_Koning at Dell.com
       </A><BR>
    <I>Wed Jun  6 13:23:51 EDT 2012</I>
    <P><UL>
        <LI>Previous message: <A HREF="000596.html">[pycrypto] PyCrypto Blowfish CFB limitation
</A></li>
        <LI>Next message: <A HREF="000598.html">[pycrypto] problems with testing PyCrypto Module
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#597">[ date ]</a>
              <a href="thread.html#597">[ thread ]</a>
              <a href="subject.html#597">[ subject ]</a>
              <a href="author.html#597">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>
On Jun 6, 2012, at 1:11 PM, Legrandin wrote:

&gt;<i> 
</I>&gt;<i> I am getting &quot;ValueError: Input strings must be a multiple of the
</I>&gt;<i> segment size 8 in length&quot; when trying to decrypt a file by using
</I>&gt;<i> Blowfish in CFB mode. The file length is not a multiple of 8. However,
</I>&gt;<i> OpenSSL doesn't require file length to be multiple of 8 and it
</I>&gt;<i> successfully decrypts the file.
</I>&gt;<i> 
</I>&gt;<i> 1. Is this a limitation imposed by PyCrypto?
</I>&gt;<i> 
</I>&gt;<i> 
</I>&gt;<i> Yes. I actually opened a bug about this, but in the meanwhile I have read in Section 5.2 of NIST 800 38A (the only standard I am aware of that describes CFB) that the input must be a multiple of the segment size.
</I>&gt;<i> 
</I>&gt;<i> That means that strictly speaking OpenSSL is not standard compliant, unless other standards saying that the last block can be shorter exists.
</I>
That certainly is the case.  The original (or at least earlier) definition of CFB is in FIPS 1026 (May 16, 1980).  It defines CFB and OFB for data units of size 1..64 (where 64 is the DES blocksize, so to generalize it for k-bit block ciphers the data unit size would be 1..k.

	paul


</PRE>


<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="000596.html">[pycrypto] PyCrypto Blowfish CFB limitation
</A></li>
	<LI>Next message: <A HREF="000598.html">[pycrypto] problems with testing PyCrypto Module
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#597">[ date ]</a>
              <a href="thread.html#597">[ thread ]</a>
              <a href="subject.html#597">[ subject ]</a>
              <a href="author.html#597">[ 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>