« first day (83 days earlier)      last day (4887 days later) » 

05:23
0
Q: Is this a pseudo number function?

huyichenIf $F:\{0,1\}^k \times \{0,1\}^{m} \rightarrow \{0,1\}^{n}$ is a PRF, then define $$G:\{0,1\}^{k+l} \times \{0,1\}^{m} \rightarrow \{0,1\}^{n+l}$$ as $$G(s.s';x)=F(s;x).s'$$(here . means concatenation) where, $x \in \{0,1\}^m, s \in \{0,1\}^k, s' \in \{0,1\}^l$, how to show that $G$ is indeed...

 
2 hours later…
07:52
@ThomasPornin I think so - it's mathematics heavy but essentially covers most of elliptic curves, which is exactly what I was after. It starts with finite fields, then arithmetic on elliptic curves and goes from there.
It does cover implementation points too, which I also liked.
08:13
0
Q: In RSA Algo , small number of repeated encodings give back the plain text , whats the cause?

sashankIn which case , does repeated encodings gives back the plain text ? any idea ?

 
2 hours later…
10:12
4
Q: Big-O for public key encryption

Porthos3I have been searching for a few days now, but I cannot find a big-O notation algorithm for encrypting, decrypting, or attempting to break an encrypted file (brute force) making use of public key encryption. I am attempting to determine the big-O notation of an idea I have developed that makes hea...

Do we want to have this? (If so, feel free to flag it for migration.)
11:10
@Ninefingers I have the Guide to Elliptic Curve Cryptography:
It is well written and covers implementation. I was actually wondering how the two books compared to each other.
@ThomasPornin From the look-inside thing it looks very similar in terms of contents; the one I have is 100 pages shorter, though and doesn't present a list of algorithms. I don't own it; but I'd be interested in the comparison also.
The LMS lecture note series are very much lecture-notes like, rather than necessarily as verbose as a book, kinda like Springer graduate texts. Sometimes, I find they're just what I need and sometimes I wish I'd brought something more meaty.
@ThomasPornin Both of them are in our library, I'll take a look in the next days. (The one by Blake is still gone until Thursday, I've reserved it now).
@ThomasPornin Ah, see that one covers extra topics, like ECMVQ; the first one I posted does not.
That one seems to be "the sequel". It is a bit lacking in homogeneity (it is basically an assembly of independently written chapters by distinct people).
11:31
How relevant are cache timing attacks on AES? See the comments on this question (in Code Golf):
0
Q: Implement Rijndael's S-box

Keith RandallRijndael's S-box is a frequently used operation in AES encryption and decryption. It is typically implemented as a 256-byte lookup table. That's fast, but means you need to enumerate a 256-byte lookup table in your code. I bet someone in this crowd could do it with less code, given the underly...

@PaŭloEbermann Ha ! That's a good question.
Most published cache-timing attacks are about AES.
Not everybody believes that they can be applied in practice
They can be demonstrated in lab conditions, even "remotely"
There are assertions in the comments that the S-box would fit into the cache together with the code ... is this the case for modern processors? (I have about no knowledge about computer hardware.)
@PaŭloEbermann In most modern processors, data and code live in separate caches
Also, the problem is not about size
rather, it goes like this: in a modern cache, a given memory location can be cached only in a few specific cache location
e.g. bye at address x can go to only 2 or 4 places in the cache
it is then conceivable to "knock out" of the cache some specific table entries by having some code which (concurrently or just before) performs memory accesses which result in using the same cache locations
then AES invocation would be slowed (a cache miss can use hundreds of clock cycles) if and only if it hits these same table entries, which depends on the key
This assumes that you can make the target system process some data in a semi-controllable way, and that you have accurate timing information.
In a lab, you can arrange for the "process external data" to be handling of an incoming UDP packet, and with enough AES decryptions you can get the timing information with some heavy statistics. But you need some very precise knowledge of the target code, you must be on the same link to get enough timing accuracy, and it takes all day.
I remember having read (or skimmed over) a paper about one such attack ... where the attacker actually sat on the same computer, and did not have access to the data, only measured its own data access times (i.e. cache misses).
@PaŭloEbermann Must have been Thomas. I'm convinced all cryptographers must really be Thomas! On a serious note, "In most modern processors, data and code live in separate caches" is the hybrid von neumann vs harvard architecture design. Essentially:
harvard architecture = data and code separate (good luck doing dynamic languages, but awesome for security - good luck injecting code!)
von neumann = mixed code and memory. Modern processors are mixed for this reason (separate caches, but one main memory) if I understand it right.
11:49
When some bytes come to the cache, we usually already know if we want to interpret them as data or code, while this might not yet true in the main memory.
So, is my requirement sensible or not?
> Bonus points (upvotes from me) if the resulting function is constant-time (i.e. no data-dependent code paths or array accesses or whatever your language supports)
@PaŭloEbermann data dependent code paths = branching, which has a cpu cost. If you want efficient code, you often do things like loop unrolling, because as I understand it instruction prefetching prefers sequential code - secure.wikimedia.org/wikipedia/en/wiki/Instruction_prefetch
@Ninefingers My point was mainly "data dependent code paths" = different CPU cost depending on data, i.e. timing attack hooks.
I don't yet want to optimize the total speed (this is a code golf exercise, after all).
@PaŭloEbermann I know, but depending on what the branch prediction code does, you will get different timings depending on different outcomes. In terms of optimisation you only care that it costs more, but in terms of timing attacks those times might be significant, I don't know.
It sounds from what Thomas said that such an attack would require lab conditions to pull off, if the effect of branching actually produces significant data.
@Ninefingers There have been lab-demonstrated attacks using table accesses (with cache effects) and branch prediction (modern CPU try to predict whether a given conditional jump opcode will be taken or not; they do so with some ad hoc rules, and an internal specific cache).
A constant-time implementation is a "selling point", at least academically
thus, what @Paŭlo requests is relevant
on a more general basis, a constant-time implementation is also, with high probability, an implementation which would map well to a FPGA/ASIC circuit
@ThomasPornin aaahhh ok. I wasn't sure whether the branch prediction and the associated cost whilst it does this (and when it has to refresh the cached code) was actually statistically enough evidence to attack a cipher with.
12:05
@Ninefingers It has been argued that the branchless, table-less block cipher Serpent is completely immune to such attacks, and that it should have been chosen as AES instead of Rijndael.
12:21
wouldn't the 256 byte lookup table for rijndael fit easily in a single cache page? (this requires aligning on 256 of course)
this would have the effect that a cache hit or miss is independent of which value you are querying
@ratchetfreak Usual level-1 caches (the ones in the processors) have shorter "lines"
I think 32 bytes per line on Intel processors, and 64 bytes per line on AMD processors
Also, a "normal" AES implementation will not use a byte->byte table, but four byte->u32 tables (i.e. about 4 kB of tables)
ah I see thanks
@ThomasPornin yep, I think you said pretty much the same thing in my question:
4
Q: XSL on serpent and rijndael - which is most affected?

NinefingersSo I've often looked at serpent and thought it was a very strong contender in AES. Not so long ago I was looking for evidence as to why it didn't beat rijndael. So far, the closest I've got answering that is this: The 32 rounds means that Serpent has a higher security margin than Rijndael; ho...


« first day (83 days earlier)      last day (4887 days later) »