Reputation
2,981
Top tag
Next privilege 3,500 Rep.
Protect questions
Badges
5 26
Impact
~56k people reached

Mar
20
comment Is it safe to prefix the a key with a known value?
It's probably a bad idea to use a value like this directly, in that some ciphers may not have been studied under partial key secrecy. At the very least, I would run a key like this through something like HKDF (or even simply a hash function) to evenly distribute the entropy in the key. With that done, the only weakness should be the reduced keyspace.
Mar
20
comment Of what use is my code for finding prime numbers of a certain size?
Nor enough storage capacity to record them all.
Mar
20
comment How dangerous is it to encrypt with AES 256 if the end user knows the unencrypted value?
If you don't need to disclose the data, why send it to the client at all (encrypted or otherwise)? You should have a clear idea of what kind of attack you're attempting to protect against before simply throwing encryption at a problem and thinking it will improve security.
Mar
14
comment Block cipher mode with diffusion on ciphertext
Listen to @RichieFrame. Use the right tool for the job — you're trying to hammer a square peg into a round hole.
Mar
13
comment If the text was compressed before using traditional cryptography, how much difficulty increases for frequency analysis attack?
The OP is talking about classical ciphers, not modern ones.
Mar
12
comment Repair AES-128 decrypted file
One could be a large number. :)
Mar
11
comment Is the 1st Encrypted Block Less Secure Than Subsequent Ones?
The second block depends on the key, plaintext, and previous ciphertext block. But the previous ciphertext block is known to an attacker, just like the IV is for the first block. Hypothesize that an attacker somehow know the first block of plaintext (say it's attacker-controlled). It's clear that this provides no additional information that could be used to break the second ciphertext block; the only input to the second encryption block that depends on that is the IV (the previous ciphertext block), but the attacker already knows it.
Mar
10
comment Known plaintext, unknown 128 bit block cipher
If you can control part of the plaintext that gets encrypted, you can potentially break this trivially.
Mar
10
comment CTR HMAC SHA256 implementation
Great, just checking.
Mar
10
comment CTR HMAC SHA256 implementation
What would you be adding a salt to? This sounds worryingly offhand, as if randomly tossing in a salt here and there might improve security.
Mar
8
comment how to integrate 2-3 algorithms to encrypt large data fastly and securely insted using AES?
Additionally, no modern cryptographic algorithm will perform differently based on what type of data it's operating on. Video, audio, text, and anything else is irrelevant, because modern ciphers operate on raw bytes.
Mar
5
comment How to compare between two cryptographic algorithms in terms of security?
Outside of simply misusing the primitives are flaws derived from not understanding the security model. Replay attacks, for example.
Mar
5
comment How to compare between two cryptographic algorithms in terms of security?
The odds are virtually infinitesimal if you're actually implementing the cryptographic primitives yourself. If you're "simply" gluing together existing primitives, the odds are merely severely stacked against you. c.f., every password hashed with MD5/SHA, keys and data appended and hashed for a poor man's (broken) MAC, timing attacks against MACs compared for equality, encrypt-then-mac and mac-and-encrypt schemes, use of unauthenticated encryption modes, IV reuse, rand, etc. There are uncountably infinite ways to get it wrong, and precious few to get it right.
Mar
4
comment How difficult is it to get a key using simple XOR
"Only" 256 bits long.
Feb
23
comment AES ECB experiment
For starters, key derivation from a password is outside of the scope of encryption modes. Simply assume that the user has provided you with a cryptographically-strong encryption key of the appropriate length. Second, it's better to start out by understanding the weaknesses that ECB mode has and composing a solution that directly addresses them, rather than taking a stab in the dark and asking "is this secure?"
Feb
13
comment Why is Poly1305 popular given its 'sudden death' properties?
HMAC is not based on any particular hash function. In fact, any PRF may be used as the underlying primitive for an HMAC.
Feb
13
comment Why is Poly1305 popular given its 'sudden death' properties?
And that has little to do with the actual question. HMAC is a provably secure construct, even assuming many kinds of broken hash function. The security of HMAC is under no doubt whatsoever by the cryptographic community.
Feb
13
comment Why is Poly1305 popular given its 'sudden death' properties?
This doesn't attempt to answer the question actually asked. It also asserts motivations of DJB that are completely unsupported.
Feb
8
comment Are passwords generated from sine vulnerable to certain attacks?
Yes, easily. Calculate sin(x) for 0 through 179. Try six through twenty digits for each of them, plus try including and removing the decimal. 5,400 guesses, and I have the password. In fact, now that you know this, you could easily script up something to figure out his password. Worst of all is that this results in the same password for every site.
Feb
5
comment Size of a MAC for a quickly checked message?
For a short enough tag, an attacker can just start over and try again from scratch every second without much penalty.