Tag Info

Hot answers tagged

7

There are many different cryptography laws in different nations. Some countries prohibit export of cryptography software and/or encryption algorithms or cryptoanalysis methods. In some countries a license is required to use encryption software, and a few countries ban citizens from encrypting their internet communication. Some countries require decryption ...


5

For many areas of encryption, you actually DO want as truly random of a value as possible. Primes (or more accurately, relative primes) only enter in to the equation when dealing with certain forms of asymmetric encryption. Asymmetric encryption is where one person has a public key to encrypt a message and then the recipient has a different private key ...


5

XSalsa20 uses the same cryptographic core as Salsa20 and comes with a security proof that it's secure if Salsa20 is secure. It doesn't use the core of ChaCha and thus has worse diffusion. The way XSalsa20 works is that it hashes its 256 bit key and the first 128 bits of the nonce using HSalsa down to a 256 bit key and then uses that key together with the ...


5

In cryptography, the algorithm should be considered public knowledge. Post the original code and we can give you a better idea if it is secure or not.


4

You got what a "semiprime" number is; it's a number which is the product of two primes. When people talk about "multi-prime RSA", what they mean is something which is pretty much the standard RSA algorithm; however the modulus is the product of at least 3 prime numbers (as opposed to standard RSA, which has only 2 prime factors). Why would anyone do this? ...


3

No, because then you could calculate $z_1 \oplus z_2 = (m_1 \land m_2) \oplus (m_1 \lor m_2) = m_1 \oplus m_2$. In practice, you can only find $m_1 \oplus m_2$ if both $m_1$ and $m_2$ are encrypted with the same OTP (i.e., $(m_1 \oplus y_1) \oplus (m_2 \oplus y_1) = m_1 \oplus m_2$). So without any knowledge of $m_1$, $m_2$, $y_1$ or $y_2$, there is no way ...


3

The comments on the question are very good. That said, I'll try to address the question(s). What factors should I consider so that it does not become weaker? This is a very important concern that I am glad you have. One of the big strengths that standard ciphers have is that lots of really smart people have looked at them and have not been able to ...


2

For CPA security it is actually enough that the first scheme, i.e., $\pi = (gen, enc, dec)$ is CPA secure. Lets define the CPA game of a general scheme $\pi = (Gen, Enc, Dec)$ against an adversary $A$ as follows: We sample $(pk, sk) \leftarrow Gen(1^\lambda)$, and send $pk$ to $A$. $A$ outputs messages $m_0$ and $m_1$. We sample $b \leftarrow \{0,1\}$ (a ...


1

What you are describing is One-Time-Pad encryption, and yes it does have perfect secrecy. Note that for any ciphertext $y$ there is exactly one key $k'$ for each possible plaintext $x'$ so that $E_k(x') = y$. So if you choose the key uniformly at random the ciphertext gives no information on the plaintext, because any plaintext is equally likely.


1

I suggest Vigenère cipher, it is fun on paper and also you can be creative in using key. you can use your phone number as key or your entire family phone number in age order. Key: ABCDABCDABCDABCDABCDABCDABCD Plaintext: CRYPTOISSHORTFORCRYPTOGRAPHY Ciphertext: CSASTPKVSIQUTGQUCSASTPIUAQJB http://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher


1

For confidentiality purposes? one time pad (when possible) rc4 (because you can by hand)


1

Asymmetric keys have to be much larger than symmetric keys because 1) there are less asymmetric keys for a given number of bits (key space), and 2) there are patterns within the asymmetric keys themselves. To compare, consider that the ECRYPT II recommendations on key length suggest a 128-bit symmetric key is as strong as a 3,248-bit asymmetric key, and ...


1

Normally, questions like this are considered off-topic; however, in this case, I can give a quick answer -- it's RC4


1

No, it won't "leak" information, as long as you're using a modern symmetric algorithm that's resistant to known-plaintext attacks. However, depending on the encryption mode used (and whether there's integrity checking or not), there can be other security implications, such as the data in the known spot being substituted.


1

Your bad hash computes each byte of digest from only two bytes of message, resulting in very few small equations which can be solved by many automated tools. I've made the assumption that digest[0] = (129*msg[0]) XOR msg[15]. Expressing this hash in Cryptol we get: badHash : [16][8] -> [16][8] badHash msg = [ x ^ y | x <- mul | y <- (msg @@ ...


1

There are two parts to this proposal: the use of a code book and a scheme to send short confidential and authenticated messages utilising an existing shared symmetric key. A code book can be used alone to provide a degree of confidentiality, or can be used to ascribe specific pre-agreed meanings to short messages, in combination with any scheme for sending ...


1

Nitpick: keytool accepts both alias and keypass if specified; if not specified it prompts for key password if needed but defaults alias to mykey. A JCEKS file can be operated on either by keytool or by other code. JCEKS can support three types of entries: privateKey, trustedCert, and secretKey (the older and default JKS file can do the first two). The ...



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