# Tag Info

## New answers tagged encryption

0

Here is a new product designed for this CryptonorDB. While your docs is encrypted with strong encryption algorithms (AES or Camellia in CBC mode), you can decorate those docs with attributes tags and query by those tags. (Disclaimer: I'm involved in project)

4

I should begin by noting that this seems like an unusual assignment. I'm not sure why someone would explicitly have a goal of combining block ciphers and stream ciphers. First, let's summarize the difference between block and stream ciphers, since this may be useful for future readers. Block ciphers are so called because they operate over fixed lengths of ...

1

Your design seems to be a byte-wise generalization of Jennings' multiplexed generator rather than the alternating step generator. S. M. Jennings, “Multiplexed Sequences: Some Properties of the Minimum Polynomial,” Lecture Notes in Computer Science, vol. 149, 1983. I believe designs like hers [may even be byte based for efficiency] have been used in ...

0

You can find the part of the key for which you know the plaintext bits by simply applying XOR over the plaintext bits and ciphertext bits at the positions concerned. In the XOR cipher the bits of the plaintext, key and ciphertext are only related to the bits in the same position. That means you won't get any information about the bits that are not in the ...

0

You should first try to determine the possible lengths of the key. Then, it would depends if your plaintext bit is bigger or shorter than the possible key length: If it's longer, you just have to map the part of the ciphertext that are coherent with your plaintext (at n and n+KeyLength, same delta between the two ciphertext characters and the two ...

13

n is the exponent. So when n is doubled from 64 to 128 it doesn't mean that you have to try twice as many values. It means that you have to try $2^{64}$ times the amount you were already trying (as $2^{128} = 2^{2\times64} = 2 ^{64+64} = 2^{64}\times2^{64}$). It is required to only search half of the key space on average (if average is the correct term ...

1

The triple DES (3DES) block cipher works by essentially running the block through DES three times. Triple DES is also known as "DES EDE" (encrypt-decrypt-encrypt) and under the name given by the standard document: "TDEA". The TDEA algorithm is described in FIPS NIST Special Publication 800-67 Revision 1 where paragraph 3.2 describes the TDEA Keying Options. ...

0

You shouldn't have to call doFinal more than once. Although in CTR Mode the blocks are independent, you can call the API functions just like you would with any other mode. The Cipher implementation will take care of increasing the counter between each block. So, with private static byte[] encrypt(final byte[] plaintext, final byte[] aesKey, final byte[] ...

1

At least it checks out: $$(3 + 2X^2 - 3X^4 + X^6)(-2 + 4X + 2X^2 + 4X^3 - 4X^4 + 2X^5 - 2X^6) = -6 + X + 6X^2 + X^3 - X^4 + 6X^5 - 6X^6 - 4X^2 + 8X^3 + 4X^4 + 8X^5 - 8X^6 + 4 - 4X + 6X^4 - X^5 - 6X^6 - 1 + X - 6X^2 + 6X^3 - 2X^6 + 4 + 2X + 4X^2 - 4X^3 + 2X^4 - 2X^5 = 1$$ multiplying out all the terms, using $X^7 = 1, X^8 = X, X^9 = X^2$ etc. and the fact ...

5

I know that some of them are pretty hard to crack, but since they are so commonly known is it even practical to consider using something like that as an encryption method considering the algorithms for encryption and decryption are commonly known (from a security perspective)? In fact, this is exactly what we want. Schneier's law Anyone, from the ...

0

I suppose you will need another party, Bob. Bob generates a pair of keys, encrypts all messages with the public key and discloses the encrypted messages to everyone, including Alice, sorted alphabetically, so that Alice cannot guess which one is t1,...tn. Alice shuffles the messages at will and encrypts them with pk1...pkn. Then Bob releases his private key ...

0

No, sorry, this is the bad case in zero knowledge proofs. Can it be done? Yes. Can it be proven to another party? No.

2

Yes, it is because it will use DES (CBC) mode of operation. DES only has an effective key size of 56 bits. Attacks on DES are able to shave a few bits off of that. So the key and the can be brute forced regardless of the (PBKDF1) key derivation. MD5, while considered broken by itself, is less of an issue when it is used within PBKDF1 - as long as the ...

2

A theoretical solution for cryptographic timelocking which if I am not mistaken was proposed by Andrew Miller, is to combine Witness Encryption (link) with the Bitcoin block chain. Witness encryption allows you to encrypt information such that users will only be able to decrypt it if they have access to information that satisfies certain properties. In the ...

2

When creating a signed and encrypted PGP message, you only use your own keypair in the signing phase -- it's not used when encrypting the message (that only uses the recipient's public key). The recipient uses their own keypair only to decrypt the message, not to verify the signature. The two keypairs don't interact at all; that's why they don't have to be ...

0

I use an ordinary AES 256 encryption. On top of this I put a layer of words generated by the content of a webpage by your choice. The moment the webpage is updated, it wont be possible to decrypt. Of course you might be able to access a cached copy of the page. But as a practical approach to the problem, this is useful.

7

This is called a transposition cipher. It is the kind of thing that was commonplace before the invention of the computer, and some people were really good at breaking that in mere minutes (e.g. Edgar Allan Poe). In all generality, breakage is done by backtracking (wrong hypotheses on permutation elements leading to "impossible digraphs" that cannot occur in ...

2

swap-or-not seems perfect for your use case.

1

Generally, the actual key for most cryptographic algorithms is a fixed length bitstring (or something more complicated, like a tuple of appropriately chosen large numbers). Thus, if you just take a valid key and add a prefix to it, it will no longer be a valid key at all. (There are a few notable exceptions, such as HMAC, which can use any octet string as ...

4

The ECDSA algorithm can't be used for encryption. It's not that there's no accepted way to do it, it's that it's simply not possible to do so. Likewise, RSA signing can't be used to encrypt (there's a mandatory hash in signing that you don't want in encryption). However, RSA signatures work similarly to RSA encryption; they aren't interchangeable, but ...

3

The MAC is NOT redundant. As alluded to by Paŭlo Ebermann's comment, the word authentication has a different meaning in the two scenarios you mentioned. In the key exchange phase of SSH, the purpose of authentication is to ensure to both parties that they are indeed talking to the right peer (if using mutual authentication). Typically, the server ...

2

Salsa/ChaCha and the other eSTREAM winners are likely to be the "fastest but still secure" options today. Don't forget authentication of course. Reduced-round ChaCha/Poly1305 is likely to be the fastest software-only option, due to tuned implementations in the libsodium and NaCl libraries. UPDATED: The following slide deck has good info on state of the art ...

0

You can of course add a trusted path requirement to Trent (the trusted key distribution center) on the top of the given protocol. This is however not a requirement for the scheme itself. Trent, as trusted third party serving multiple users, of course needs to know who to communicate to. So the identity cannot be encrypted with the public key of Alice or ...

2

[After your edit I can confirm that the browser does the whole encryption in the background - you only get the "normal" HTTP connection to see and the downloaded files appear as big as the unencrypted files - even if the encrypted files are only marginally bigger. You don't ever see the encrypted version without some addition work. You can use a secure ...

1

Using the Chinese Remainder Theorem I can compute $M^3$, and then take the cube root. This is why multiple recipient RSA is insecure.

3

Perhaps the professor was misquoted; the assertion that (in the context of constructing cryptographic algorithms) "permutations which are done repeatedly does not further enhance security than just one permutation" is false. Proof by an extreme example: consider a variant of DES where we insert after permutation $P$ another permutation $Q=P^{-1}$. This DES ...

4

The reason two permutations in a row don't increase security is that there is always a third permutation that's equivalent to performing the two permutations in a row. For instance, suppose we have 5 elements, and the following two permutations: \begin{align} \sigma_1 &: 12345\to34251 \\ \sigma_2 &: 12345\to43512 \end{align} Then if we apply ...

1

As mentioned this is a very broad question, so please forgive me for not going into any great depth on each point. There are a few ways to beat encryption. One way is to attack the actual math of the cryptography: for PGP that would involve cracking RSA, which would involve finding a way to solve the discrete log problem. This is the hardest method, but ...

1

AES is asymmetrical in this regard. It is down to the key schedule, which generates a sequence of round keys from an initial key. In a modern desktop environment, the round key sequence is simply generated before encryption/decryption starts, so the difference in speed is minimal. In a memory-constrained environment like a smartcard, this may not be ...

0

I just noticed that you take the time for encryption and sending the result over a serial line. Serial line transmission is - I guess - significantly slower than AES operations on the Arduino. Your calls to micros() should be as close to aes_encrypt() as possible, otherwise the measurement is falsified. If the size of the data sent over the serial line is ...

-1

Traditional encryption is weak and no longer be used. They can be easily broken by using frequency analysis is a well-known fact. Im no crypto expert, so I cannot answer the full of your question-- but this part is not correct. Encryption using algorithms such as 3DES, RC4, AES, etc is secure to the point where it is not possible to determine from ...

2

Yes, there are modes of operation that achieve the property that you are describing. For example, the Propagating Cipher Block Chaining (PCBC) mode of operation: This mode is similar to CBC but the output for each block is propagated to the input of the next one, so a small error will propagate indefinitely, both for encryption and decryption. There may ...

2

Based on your description, you will not be able to recover the original encrypted file. Since you specify that you used a password and do not indicate the use of an IV, my assumption is that you did, in fact, use a passphrase rather than a secret key. When you encrypt a file with a passphrase, OpenSSL assumes that it is a low-entropy string unsuitable for ...

17

In short: You must authenticate the IV. Which particular attacks apply if you don't depends on the block cipher mode; I will give two common examples. In CTR mode, an attacker who fiddles with the IV can forge authenticated messages, but the content of the corresponding plaintext is beyond his control (since he doesn't know the key). Depending on the ...

4

The Encrypt then MAC is done in general in order to be sure to decrypt into the correct plaintext, without risking of parsing a non-authentic plaintext message. If you don't MAC the IV, then Mallory (attacker that can tamper with messages as a man-in-the-middle) can modify the IV and your MAC will be still validated as good. So you will decrypt into an ...

2

There are $2^8$ one-byte (technically, one-octet) patterns. That implies there are $2^8$ four-octet strings where all four octets are identical out of $2^{32}$ possible patterns. $\frac{2^8}{2^{32}}=2^{-24}$

1

use letters to represent digits "a captured German revealed under interrogation that Enigma operators had been instructed to encode numbers by spelling them out ... Alan Turing reviewed decrypted messages and determined that the number "eins" ("one") was the most common string in the plaintext." -- Wikipedia: known-plaintext_attack "The Enigma machine ...

2

No, the IGE encryption cannot be parallelized. Also the decryption of IGE/ABC is serial. The input to the block cipher for encryption is the ciphertext of the previous block xor'd with the plaintext (and the result is then xor'd with the previous block plaintext). For decryption, you have to XOR the ciphertext with the plaintext of the previous block ...

1

This technique is known as Ciphertext stealing. Ciphertext stealing avoids padding, but only works if the total message size is bigger than one block. Ciphertext stealing secure in principle, but as @mikeazo already pointed out using ECB and using 64 bit block ciphers is generally a bad idea. There are fancier length preserving encryption schemes. FFX mode ...

5

That "algorithm" is fine, as long as the random values cannot be guessed by an attacker. The scheme is known as (trivial) secret sharing. XOR with completely random data is called a one time pad or OTP. The security of the algorithm therefore depends on the random number generator. Of course there are additional operational requirements to obtain system ...

1

ElGamal is a scheme, that can be applied to any kind of group structure. The only requirement is that DDH has to be hard (e.g. not $(\mathbb{Z}_p,+)$). If you use the most common construction with multiplicative groups $(\mathbb{Z}_p^*,\cdot)$, then you need larger groups, due to attacks like index calculus. If you use elliptic curves, you can use smaller ...

1

Well there is Steganography like Richie said in the comments it is essentially the art of hiding messages. This being said it is not comparable to any encryption algorithm (like AES) security wise. Though there are tools for steganography which requiere keys so they encrypt data before they hide it but this is not the essence of steganography since ...

0

To answer your question about the size of primes: The current recommendation for RSA keys recommends using two 1024-bit keys. That means they're somewhat larger than $10^{300}$; Diffie-Hellman on the integers modulo $p$ is normally used with a single prime of at least 2048 bits (so, larger than $10^{600}$!) Even worse, these numbers tend to grow over time; ...

1

This question is really broad. I'll try to answer in a few sentences. Of course, $\mathbb Z$ in its widely accepted definition has infinitely many primes. This means: the properties people usually expect from something we may rightly call "the integers" already imply that this thing contains infinitely many primes. Hence it is impossible to keep everything ...

2

Could someone even recognize that the values are encrypted? Well, maybe, maybe not. You're correct that the values would all appear to be valid dates (this is known as format-preserving encryption, by the way), so they would not look obviously encrypted, the way, say, a random hex string would. If someone just saw a small number of such dates, with no ...

2

None of Twofish, Serpent and AES are currently known as broken, so as far as security is concerned, you can use any of them. AES has a slight advantage because it's very widely used, so if it gets broken you're more likely to hear about it and get relevant software updates quickly. The Snowden postings haven't changed much as far as cryptography usage is ...

Top 50 recent answers are included