1,245 reputation
39
bio website
location
age 45
visits member for 3 years, 7 months
seen 2 days ago
programs in C and Perl, mostly

2d
comment Is it secure to transmit a short plaintext with its MAC?
Glad to be able to help
2d
comment Is it secure to transmit a short plaintext with its MAC?
So the nonce is authenticated as well, hopefully. Yes, for messages that fit into the domain of a block cipher this is quite a valid construction and a good reuse of primitives. In this case it's a doubling, in general, for longer messages, one would use CBC-MAC or HMAC and then the extra data is quite reasonable.
2d
comment Encode-decode with different block sizes?
Sounds like an EVP like interface to AES is used. Use a lowlevel block implementation. A do final suggest that padding is applied (as is normal for CBC mode, e.g.)?
Mar
2
comment What are the steps to decrypt a TLS 1.1 record?
Yes, this is true if we have a CBC cipher (or even an AEAD cipher, which also has a nonce/IV and is supported in 1.2), not for stream ciphers, of course. 1.2 works the same way.
Feb
26
comment Hashes and Ciphers
RSA is an (public key, so assymetric) algorithm, 3DES is a symmetric algorithm. Both are not protocols, but building blocks in cipher-modes, which in turn are used in protocols, like IPSec, TLS, SSH, etc. The last use hashes as part of HMAC's (mostly) to ensure that data is not tempered with, and in key-derivation.
Feb
24
comment Using hash for one time pad key
@VincentAdvocaat this is the same as my point from the comment on the original question. Why bother with a system that one cannot encrypt arbitrary data with? OTP is not broken if plain text is known because key stream is not reused and independently random. So knowing part of it comprises nothing. Here knowing only 32 bytes kills everything.
Feb
23
comment Using hash for one time pad key
Suppose your hash is 16 bytes long (like MD5), and you need to encrypt known plaintext of 16 bytes as part of a protocol say or some file format, your system is dead after dead. Even e.g. 12 bytes is deadly as you brute force all 4 unknown plain text bytes.
Feb
22
comment Hill Cipher the point of a known plaintext attack question
@Connor Glad I could help!
Feb
22
comment Substitution-permutation network
AES is an example, one could say the most important one.
Feb
22
comment Substitution-permutation network
It's IMHO probably best understood by an example.
Feb
22
comment Substitution-permutation network
youtube.com/watch?v=mlzxpkdXP58 has a nice animation for AES as an example..
Feb
19
comment How to implement the Salsa20 hash function?
Logical shift, and yes, & is missing
Feb
17
comment Crack RSA with additional information
In most textbooks (that I assumed the problem was from) it is.
Feb
17
comment Crack RSA with additional information
You even need only one pair $e_A$ and $d_A$.
Feb
10
comment Trivium example
ecrypt.eu.org/stream/p3ciphers/trivium/trivium_p3.pdf, paragraph 2.1 specifies the output bytes, which are the $z_i$.The $t_i$ are then updated, and used as feedback bits. But the output is produced before the feedback bits. I don't have access to your book.
Feb
9
comment Trivium example
@NikolaLošić As to the first bit: the first 2 registers give $0$ as output, the last gives 1 (it's the final bit (1) and a middle one (which is 0)), so their xor equals 1. The output is the xor of three outputs, each of which is the xor of two bits from a different register.
Feb
8
comment Trivium example
I get 1110000000000000000000000000000000000000000000000000000000000000000110 (left to right is order in time).
Feb
8
comment Trivium example
The output consists of the xor of 6 bits (2 from each register). You output the xor of the update bits. I don't have the book, but I suppose $s$ is the stream of output bits?
Feb
2
comment Decrypt a message which is encrypted using XOR?
It seems that crypto.stackexchange.com/q/22710/553 has the same problem as you?
Jan
19
comment RSA Key generation: How is multiplicative inverse computed?
Yes, it is a theorem (not too hard) that knowing $\phi(n)$ and $n$ both, we can compute $p$ and $q$. Even knowing all of $n,e$ and $d$, we can find $p$ and $q$ using a probabilistic algorithm. Just knowing $n$ and $e$ is too little info (it is assumed) to compute either $\phi(n), p, q $ or $d$.