diff options
Diffstat (limited to 'pipermail/pycrypto/2012q2/000568.html')
-rw-r--r-- | pipermail/pycrypto/2012q2/000568.html | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/pipermail/pycrypto/2012q2/000568.html b/pipermail/pycrypto/2012q2/000568.html new file mode 100644 index 0000000..162f262 --- /dev/null +++ b/pipermail/pycrypto/2012q2/000568.html @@ -0,0 +1,92 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<HTML> + <HEAD> + <TITLE> [pycrypto] RSA / OAEP - ValueError: Plaintext is too long. + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20RSA%20/%20OAEP%20-%20ValueError%3A%20Plaintext%20is%20too%20long.&In-Reply-To=%3CCAGfyce1NE0dsMm%3DwenX2sJajDBG-BpaEdxzwSws7eUQ19V7w3g%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="000567.html"> + <LINK REL="Next" HREF="000569.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[pycrypto] RSA / OAEP - ValueError: Plaintext is too long.</H1> + <B>Legrandin</B> + <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=Re%3A%20%5Bpycrypto%5D%20RSA%20/%20OAEP%20-%20ValueError%3A%20Plaintext%20is%20too%20long.&In-Reply-To=%3CCAGfyce1NE0dsMm%3DwenX2sJajDBG-BpaEdxzwSws7eUQ19V7w3g%40mail.gmail.com%3E" + TITLE="[pycrypto] RSA / OAEP - ValueError: Plaintext is too long.">gooksankoo at hoiptorrow.mailexpire.com + </A><BR> + <I>Wed Apr 11 08:19:09 EDT 2012</I> + <P><UL> + <LI>Previous message: <A HREF="000567.html">[pycrypto] RSA / OAEP - ValueError: Plaintext is too long. +</A></li> + <LI>Next message: <A HREF="000569.html">[pycrypto] RSA / OAEP - ValueError: Plaintext is too long. +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#568">[ date ]</a> + <a href="thread.html#568">[ thread ]</a> + <a href="subject.html#568">[ subject ]</a> + <a href="author.html#568">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>><i> So after a small search i found out that if i increase the RSA Modulus i'm +</I>><i> able to encrypt larger number of bits ( makes sense )  but this feels dirty. +</I>><i> +</I>><i> What do your guys recommend ? +</I>><i> +</I>><i> Breaking the data in chunks and encrypting part by part joining it all in a +</I>><i> buffer and send it down the socket all in one with the other server +</I>><i> decrypting part by part and merging the data again ? +</I>><i> +</I>><i> P.S - I dont mind fishing by myself just trying to understand the best "way +</I>><i> / more correct way " to do it :) +</I> +Hi Antonio, + +Increasing the RSA key length is not "dirty": it simply increases +security (and incidentally useful payload size) at the expense of +decryption speed. +If decryption speed is not that important to you, and you have a clear +idea on how long you data can be at most, go ahead and increase the +key size. The time you gain by taking this approach can be spent on +important tasks like making the private key secure, or adding some +form of authentication to your protocol. + +The "proper" way to do encryption would be to create a random AES +session key (16 bytes), encrypt it with RSA (hopefully at least 2048 +bit long), send it, pad the data, encrypt it with AES, send it. +Additionally, you should also sign the data and send the signature +along. + +At the receiving end, you decrypt the session key with RSA, decrypt +the data with AES, unpad the data, and verify its signature. +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000567.html">[pycrypto] RSA / OAEP - ValueError: Plaintext is too long. +</A></li> + <LI>Next message: <A HREF="000569.html">[pycrypto] RSA / OAEP - ValueError: Plaintext is too long. +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#568">[ date ]</a> + <a href="thread.html#568">[ thread ]</a> + <a href="subject.html#568">[ subject ]</a> + <a href="author.html#568">[ 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> |