3,435 reputation
1522
bio website
location Wellington, New Zealand
age
visits member for 2 years, 2 months
seen 7 hours ago

I am an undergraduate computer science and mathematics student in New Zealand. My fields of interest are computer graphics, in particular the physics of light transport, and to some extent cryptography, as well as programming and software development in general.


May
2
comment Encrypt a single file, chunk-by-chunk, each chunk using different key (AES)
@tcboy88 You don't need new keys for every single chunk. You can encrypt with a parallelisable algorithm (say, CTR) with the right IV and with the same key and then simply send that chunk. You'll be able to decrypt it when you get it back (even without other chunks, yes). But you need to store a MAC to make sure the chunk makes it back from the cloud intact (has not been modified by an attacker or simply damaged somehow)
May
2
answered Encrypt a single file, chunk-by-chunk, each chunk using different key (AES)
May
1
comment detecting ROT13/base64 encryption
Not really, in my opinion. Encoding needs to be reversible, you need to be able to "decode" the encoded data back to the original data. But I suppose it could be argued that non-reversible processes could be called "encoding" in a meaningful sense (for instance, lossy compression).
Apr
29
comment Custom crypto library in C
@mikeazo Yes, with only network access it wouldn't be possible, I agree with you, though for handheld devices I would assume physical access is rather easy. But the question is quite vague on the intended threat model.
Apr
29
comment Custom crypto library in C
Or you could just use existing portable crypto solutions (yes, yes, there are some). By the way, using sleep() won't do anything against side channel attacks, an attacker will be able to distinguish the processor sleeping from the processor actually doing crypto work.
Apr
26
comment detecting ROT13/base64 encryption
@HM Encoding simply means to "write something differently", either to save space, increase readability, or some other purpose. Encryption means "encoding something with the clear purpose of preventing unauthorized entities to read the information". So encryption is a specific form of encoding, but encoding is not encryption. But in general we do not like to call encryption encoding because it is too broad a term.
Apr
24
comment Using the output of a stream cipher, how to guarantee the integrity of 4 bytes of data?
You need some kind of MAC before receiving the message, because if everything fails the attacker can always randomize the encrypted header which will decrypt to a huge message size field on average.
Apr
24
comment Tamper-proofing log files
@MurrayA Not if there is more than one possible date between two log files. Yes, including the filename somehow in the authenticated data would fix that.
Apr
24
comment Tamper-proofing log files
Solution 1 does not handle the case where the attacker renames the file.
Apr
23
comment SHA256 HMAC brute force with chosen plaintext attacks
Short answer: it is fine until the private key is compromised. Hopefully someone can provide the long answer.
Apr
23
comment Quality of randomness on a Linux system with haveged
When I meant garbage I meant stuff like an infinite string of zeros, e.g. zero-entropy stuff intended to corrupt the entropy pool, because the entropy pool hopefully reinitializes every few milliseconds and does not rely on one unique source of entropy, it's supposed to be resistant to this kind of poisoning by design, so, yes, I would expect the driver to implement correct accumulation algorithms, since it's what it's supposed to do :p (though it is much more complex than that)
Apr
23
comment Quality of randomness on a Linux system with haveged
A real-time HRNG requiring no additional hardware suitable for both cryptography and Monte-Carlo simulations sounds a bit too good to be true, to be fair. And there are almost no reviews on it, which makes me feel uneasy about using it. That said, unless the algorithm is phenomenally bad, it is quite hard to defeat a good entropy collector even when feeding huge amounts of garbage in it, so I would guess the bias would be academical. Good question though!
Apr
20
comment Is encrypting a single 128 bit block with AES ECB “safe”
Well, putting aside the problematic fact that AES uses a 128-bit block regardless of the key size (you may want to fix that), it depends. If you encrypt it multiple times, an observer can know the same SSN (or whatever) is used at two different places, which may leak information.
Apr
15
comment Correct way to truncate data to a range
@chewsocks To verify it yourself, what I suggest is take a reduced version of your algorithm (say, 2^7 and 100 instead of 2^17 and 100000), then iterate over all possible inputs to the algorithm and plot a frequency histogram of the 100 possible outputs. A uniform distribution will be flat - but you won't get that.
Apr
15
comment Correct way to truncate data to a range
@chewsocks The mod operator is the problem. You are reducing 2^17 different values into disjoint equivalence classes of 100000 elements (namely 0 to 99999). Since 100000 does not divide 2^17, you have one equivalence class which is smaller than 100000, and therein lies the bias (in fact, one equivalence class will have only 31072 elements instead of 10000, those elements are twice as likely to occur as the others - hardly a uniform distribution). For 2^32 the bias is smaller, but still present. a mod m is unbiased iff m divides the range of a.
Apr
13
comment Proper uses for CTR and CBC AES block cipher modes
@Luke HMAC has the advantage of not needing an IV or anything, and is pretty much the standard when not using an authenticated mode (though again, it is not trivial to use correctly, even though it looks like it should be). I would recommend it if you have no exotic requirements and cannot use GCM/OCB/etc..
Apr
12
comment Proper uses for CTR and CBC AES block cipher modes
Encryption is a general solution and when done right doesn't care about the underlying structure of the data being encrypted. Consider that with CTR, you will need to add authentication yourself (perhaps using an HMAC) whereas OCB already includes that. Have you thought about that?
Apr
10
comment Signature schemes for underpowered devices (8bit microcontroller)
@brunosmmm Because threats are always underestimated.
Apr
10
comment Given a certain entrophy per character, how long should a passphrase be to guarantee key strength?
@PaŭloEbermann Indeed! Thanks for the correction.
Apr
9
comment Ciphers in CBC mode reveal place of change in plaintext
@mikeazo Done..