Conversion form plaintext to 8bit ASCII to Hex [closed] - encryption

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 days ago.
Improve this question
Suppose you are told that the stream cipher encryption of the message “attack at dawn" is 6c73d5240a948c86981bc294814d (the plaintext letters are encoded as 8-bit ASCII and the given ciphertext is written in hex). What would be the stream cipher encryption of the message “attack at dusk" under the same key?
Stream cipher is a bitwise encryption, so changing one bit in plaintext will change one bit in ciphertext. So the ciphertext of "attack at dusk" should be 6c73d5240a948c86981bc294814k

Related

Why middle block of 3DES is decryption rather than encryption? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
hey can someone answer these 3 questions please
Why middle block of 3DES is decryption rather than encryption? 2. Suppose an error occurs in a block of ciphertext during transmission from the sender to
receiver. What effect will be observed on the recovered plaintext at the receiver? 3. Inclusion of salt in UNIX password scheme is the difficulty of guessing password by 4096. However, the salt value is stored in pain-text as same entry as ciphertext. The salt value is known to attacker and need not be guessed. Then why is it asserted that salt increases security?
It's decryption with a different key to the first encryption.
Decrypting with the wrong key will further convolute the output.
3DES is a feistel cipher structure, encryption and decryption are symmetrical.
The reason triple DES is of the form EDE is for one reason, and one reason only: to make it compatible with single DES - thanks to #James Polk

What is encryption IV for? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
What is the IV in encryption used for?
Is this a valid example for encryption with IV? (Pseudocode)
Encryption->xor data with key, prepend IV to output
Decryption->just remove IV and xor the rest with same key
The IV (Initialization Vector) is designed to be random for each message so that two identical messages encrypted with the same key are not the same thus leaking information. The IV does not need to be secret so it can just prefix the encrypted message.
The point is that the IV causes the entire encrypted message to be different, adding it to the message is just one common way to make it available for decryption.
Consider the case where Alice sends Bob a message every day of where they will meet, either the mall or the post office. With the same key and IV eavesdropping Eve after noticing where they meet but not knowing which location can tell just be looking at the encrypted message without need to decrypt it. It could be "attack at dawn" or "attack at dusk".
The key can be pre-shared once and reused securely for many messages just by using a different random IV for each message.

One text encrypted with multiple keys. Is it secure? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Let's say i have one plaintext and i encrypt it with different keys (each on its own). Is it possible to find the plaintext from these encrypted ciphers or how hard is it to resample the text?
Does this even make sense, especially in respect to asymmetric-encryption?
For example:
VALUE KEY CIPHER
"abc" + "key1" -> "izwer"
"abc" + "key2" -> "werio"
"abc" + "key3" -> "nbmdi"
"abc" + "key4" -> "oiuuw"
The best known example of an attack against asymmetric encryption with multiple keys is
Hastad's broadcast attack against RSA.
This is of course one of the motivations to use a properly designed padding scheme.

Why is encryption so significant/difficult? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm a total beginner to encryption and I don't really understand anything about it.
Let's say I had a file TOPSECRET.BIN. What if I just:
read file byte by byte
XOR each byte by 69
write "encrypted" data back into file
Sure it's simple, but how is anyone ever going to know how to decrypt that?
The main problem is that your ciphered text will still exhibit the hierarchical structure of the cleartext. So if the cleartext was english text, the same hierarchical structure you see in the english phrases will be in the ciphered message.
If you XOR each byte with 69, figuring it out will be as simple as just trying 256 bytes to XOR. Plus language structure can be used for cryptanalysis.
You can use XOR for perfect encryption, though. Just choose a random sequence of bytes with length equal to your text and XOR it byte by byte. The random bytes will be your key. However, it will be as hard to communicate this key securely as it would be the message itself. And if you reuse this key, it would be easy enough to analyze multiple encrypted messages to figure it out.

AES 256 in CTR mode [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
ctr mode makes it possible to use a block cipher as a stream cipher but how strong will be the encryption in this mode ?
Ultimately it depends what you mean by strong. For example from an encryption point of view, i.e. taking the ability of an attacker to decrypt your ciphertext without access to the key, it should be as strong as any other use of AES256 (there is some dicussion on differential analysis between individual cipher blocks with a known plain text but that would be a weakness of the encryption algorithm not of the CTR mode itself).
In the end whether CTR mode is appropriate will depends what you want to apply it to and how you implement it. A couple of things to bear in mind when using this mode would be:
The same nonce/counter sequence will create the same cipher stream therefore you must ensure you do not ever use the same values for a given key. Otherwise it might be possible for an attacker given a message with a known plain text to reuse the cipher stream to decrypt your current message).
As the stream cipher is XORed with the plain text it means that a 1 bit change in the ciphertext directly results in that bit changing in the decrypted data, therefore some sort of message integrity is paramount, most likely a HMAC so that an attacker cannot realistically generate the hash and correct that as well.

Resources