121 reputation
6
bio website pvv.org/~rolfn
location Oslo, Norway
age 38
visits member for 2 years, 6 months
seen May 7 at 19:04
Computer professional working with architecture, requirements and project management. Expert in java, SQL, xml and various internet protocols. Fluent in C and several unix-variants. Know some perl, python, common lisp, opengl, prolog, C++.

Apr
8
comment Encrypting many small messages (log-lines)
A small update on this: I took a look in Practical Cryptography (Ferguson/Schneier) which actually recommends using an encrypted message counter as IV, because you typically need a message counter anyway to prevent message replay or message deletion, and for a counter 48 or 64 bits would be sufficient.
Mar
18
awarded  Teacher
Mar
14
awarded  Scholar
Mar
14
accepted Encrypting many small messages (log-lines)
Mar
14
awarded  Supporter
Mar
14
awarded  Editor
Mar
14
revised Encrypting many small messages (log-lines)
added 1002 characters in body
Mar
14
comment Encrypting many small messages (log-lines)
This was javax.crypto with default settings, I was not aware of the possibility (or consequences) of changing the key parameters. I will update with more info.
Mar
13
answered Encrypting many small messages (log-lines)
Mar
12
comment Encrypting many small messages (log-lines)
I don't think message replay is a problem. This is a logging setup, and each log-message will probably have both a timestamp and a unique id. False messages might be a problem (sender A sending messages pretending to be from B), but that would be much harder to solve.
Mar
12
comment Encrypting many small messages (log-lines)
I don't know if gzip reduces message-size, I'll benchmark that. However, it is common common advice to compress messages before encryption to make a known-plaintext attack harder. In cryptographic context, the point of integrity is usually to ensure who has sent the message, and to achieve that I would need to sign it with the senders private key. That would be unfeasible for logging, I'll look in to this further.
Mar
12
comment Encrypting many small messages (log-lines)
Thank you, I see there are some blank spots in my understanding of RSA, reading up on OAEP now...
Mar
12
comment Encrypting many small messages (log-lines)
The AES "session key" will be included in the log-message, encrypted with RSA. I believe this is the common mode of operation when using asymetric encryption: use RSA to encode a session key, include the encoded key in the message.
Mar
12
comment Encrypting many small messages (log-lines)
Hm, looking more at this, I guess I need an IV in the first example as well.
Mar
12
awarded  Student
Mar
12
comment Encrypting many small messages (log-lines)
Great input. I won't implement RSA or AES myself, I'll use javax.crypto. I will probably benchmark to find out if the re-use of keys is neccessary.
Mar
12
asked Encrypting many small messages (log-lines)
Jan
20
awarded  Autobiographer