Tag Info

Hot answers tagged

222

I dug out my copy of Applied Cryptography to answer this concerning symmetric crypto, 256 is plenty and probably will be for a long long time. Schneier explains; Longer key lengths are better, but only up to a point. AES will have 128-bit, 192-bit, and 256-bit key lengths. This is far longer than needed for the foreseeable future. In fact, we cannot even ...


56

For one AES is built for three key sizes 128, 192 or 256 bits. Currently, brute-forcing 128 bits is not even close to feasible. Hypothetically, if an AES Key had 129 bits, it would take twice as long to brute-force a 129 bit key than a 128 bit key. This means larger keys of 192 bits and 256 bits would take much much much longer to attack. It would take so ...


41

The reason why RSA keys are so small is that: With every doubling of the RSA key length, decryption is 6-7 times times slower. So this is just another of the security-convenience tradeoffs. Here's a graph: Source: http://www.javamex.com/tutorials/cryptography/rsa_key_length.shtml


31

It's like one of these: Say you want to secure something in a box. Anyone can close the lock (public key). This means anyone will be able to put something into the box and lock the box (they won't be able to open the lock once it's locked (you just pinch these closed)). The key to open the lock is something only you have (private key). You are the only ...


9

For signing only, a 512-bit RSA key ought to resist at least a few days, more probably a few weeks, even against determined attackers. This is still "reasonable" as long as you verify the signature "soon". You can imagine that from the point the public key was made public, you have a few minutes, at best hours of security, after which you must consider the ...


8

If it is public it cannot be secret... A key is "a parameter for an algorithm, which concentrates secrecy". This means that the key is not only secret, but, normally, nothing else is (algorithms are known to everybody). A public key is a paradoxic terminology which was coined when asymmetric cryptography was invented. The "real" key is what we call the ...


7

Processing time, pure and simple. Everything in security is a balancing act between the need for security (keeping the bad people out), and useability (letting the good people in). Encryption is a processing expensive operation even with dedicated hardware for doing the calculations. It simply isn't worth going beyond a certain level of security for ...


7

With a modern but not-so-speedy x86 processor, and a good enough implementation, cryptography speed will not be the bottleneck. For instance, consider a quite cheap AMD Athlon 2650e processor, a not-so-modern and really-not-so-speedy processor that I have in my home file server; it is clocked at 1.6 GHz and has a single core. It can still do about 2200 RSA ...


7

ElGamal is an asymmetric encryption algorithm, which is used in OpenPGP. Almost all usages of asymmetric encryption is for key exchange (by encrypting a random string, which is then used as shared key in symmetric encryption algorithms). There are key exchange algorithms which are not asymmetric encryption algorithm, the most well-known and used being ...


7

You cannot have a secure signature scheme in less than 50 bits. Demonstration: the attacker can just enumerate all sequences of 50 bits until a match is found. Indeed, one point of digital signatures is that the verification algorithm can be computed by just everybody, since it uses only the public key (which, by definition, is public). Best you can hope, ...


6

As far as RSA goes, this provides a good example that can be followed and shows corresponding examples of input and output. This demo application will walk you through the various steps and allow you check the work. Sometimes just clicking your way through something in steps like that will help. For Wikipedia articles, you need to look at the actual ...


6

If you encrypt the message using a symmetric algorithm (AES), then you store this key twice - once encrypted with the admins public key, and the other with the users public key. This way when the admin wants to view the message, he decrypts the first key, and the user uses the second.


6

X.509 is a format for certificates: a certificate is a sequence of bytes which contains, in a specific format, a name and a public key, over which a digital signature is computed and embedded in the certificate. The signer is a Certification Authority which asserts that the public key is indeed owned by the entity known under that name. By verifying the ...


6

You should avoid the "weak" cipher suites: Cipher suites with no encryption (with a NULL in the name). Cipher suites with 40-bit or 56-bit symmetric keys (DES, DES40, RC4_40, RC2_CBC_40)(3DES is fine, though). Cipher suites marked "for export" (with EXPORT in the name: they are weakened to comply with pre-2000 US export regulations). Cipher suites with no ...


5

Is the javascript run in a browser? If so, don't try to encrypt anything at all. Please refer to my other answer for details. Basically, if you are doing something with javascript, the connection is either a) already secure or b) will not be any more secure with anything you do within the web app. Note that I talk about hashing there but it really applies ...


5

In a way, algorithms using such "insanely large" keys already exist. It's called one-time pads. Nobody really uses them in practice, though, since they require a key the length of the message you wish to encrypt and key material can never be reused (unless you want the ciphertext to become trivially breakable). Given that the purpose of encryption is to ...


5

You can't. This is a fundamental principle of general purpose computing. You're running into Shannon's maxim: The enemy knows the system. One ought design systems under the assumption that the enemy will immediately gain full familiarity with them. Just to make my point completely clear: you're giving someone a car, and asking them to only ever drive ...


5

The operation at the core of RSA is a modular exponentiation: given input m, compute me modulo n. Although in general this is a one-way permutation of integers modulo n, it does not fulfill all the characteristics needed for generic asymmetric encryption: If e is small and m is small, then me could be smaller than n, at which point the modular ...


4

Actually, the math around it is pretty simple, as I understand it. You take a value to the power of a rediculously large prime number (thousands of digits) and do a mod from another number. So to encrypt you have something like: EncryptedBits = (PlainText ^ YourPublicKey) % Modulus And to decrypt you have something like: PlainText = (EncryptedBits ^ ...


4

Wikipedia's examples of asymmetric algorithms inlcuding: Diffie–Hellman key exchange protocol DSS (Digital Signature Standard), which incorporates the Digital Signature Algorithm ElGamal Various elliptic curve techniques Various password-authenticated key agreement techniques Paillier cryptosystem RSA encryption algorithm (PKCS#1) Cramer–Shoup cryptosystem ...


4

I put together a demonstration of RSA using python (python is very easy to read even if you've never seen it before). The code is long enough that it doesn't fit on a single page, but short enough that you can read and understand it in a few minutes. Since encryption/decryption can be accomplished in a single built-in command -- exp(PLAINTEXT,KEY,MODULUS) ...


4

I'm quite confused by the question, but I'm going to take my best shot. Aside: Normally I strongly dislike this approach, but intuition tells me that nagging the OP to clarify questions that s/he admits s/he doesn't fully understand is a worse violation of SEC:SE principles. RSA, and all public key encryption, is very processor intensive. I'm not ...


4

In addition to the great answer by @Lucas, you can make the comparison: Symmetric cryptography is like a door lock. Everyone that has a key can lock and unlock: Asymmetric cryptography is like a common lock or handcuff. Anyone can lock it but only the (private) key unlocks it:


4

I found these videos easy to understand and usefull: https://www.youtube.com/watch?v=3QnD2c4Xovk The second is starting with SSL, but later the guy is speaking about symmetric and asymmetric cryptography: https://www.youtube.com/watch?v=JCvPnwpWVUQ


4

Let's assume here that we are talking about a serious design for emails, i.e. one without a centrally trusted server (we already have Gmail; if we are to trust a potential Evil Overlord, we may as well choose a competent one). When using a Web site, you use the Web site interface, which can do nasty things behind your back. The same holds for every piece of ...


3

Processing time was already mentioned. Even in that respect the time required to generate an RSA key should be mentioned separately, since it is MUCH more costly for longer keys, since you need to find prime numbers of roughly half the size of the desired RSA key. Another topic is space, i. e. the amount of data generated. Asymmetric and symmetric ciphers ...


3

Adding more evidence to the "because it slows things down unnecessarily" answers, it seems like AES execution time doesn't grow as fast as RSA when key length goes up (and RC6 grows even more slowly), but it's still a 16% execution time increase to double key length, according to http://www.ibimapublishing.com/journals/CIBIMA/volume8/v8n8.html .


3

I've drawn this some time ago. Where symetric use same key for in and out, while asymetric use different (incompatible or unexchangeable) keys. Hope this help... (Nota this stuff is licenced under LGPL V2)


3

You have basically described how encrypted emails work, with either S/MIME or OpenPGP. With emails, the data transfer and storage servers cannot access the email contents; in your description, you are just using Web-based protocols (i.e. HTTP) for the particulars, instead of the email transfer protocols (SMTP, IMAP...). The details of encryption (which ...


3

I think a better question is: "What problem are you trying to solve using this encryption?" In practice, public-key cryptography is used over insecure channels to ensure both data-integrity and non-repudiation (the message is intact, unchanged, and came from who it is claimed to have come from). Conceivably the only reason I can think of that you'd be ...



Only top voted, non community-wiki answers of a minimum length are eligible