![]() ![]()
|
sci.crypt Sandbox - Scoring Professional mode (go to all ciphers) |
Sp = atan((P/41.75)^(1/4))*2/pi
where
P = speed of algorithm in mbytes/sec
pi = 3.141592654...
This clearly gives a score between 0 and 1.| Level | Score |
|---|---|
| No attacks | 0% (Sb = 0) |
| Distinguisher | 10% (Sb = 0.1) |
| Chosen plaintext | 30% (Sb = 0.3) |
| Known plaintext | 60% (Sb = 0.6) |
| Known ciphertext | 100% (Sb = 1.0) |
M = (1-K*(lg(T)^2 + lg(S)^2))/C
where:
T = time for attack
K = 1/(B^2)
B = bits per key
S = space for attack (bytes)
C = "Minimum security" constant
The space required for an attack includes any plaintext or ciphertext that is
required.
K = 1/(128*128) = 1/16384
M = (1 - (1/16384)*(36^2 + 32^2)) / 0.875
= 0.9810
If this was a known ciphertext attack, and was the first attack on the cipher,
the cipher's score would be reduced to under 2% of its pre-attack score.| Item | Score |
|---|---|
Reference implementation (C/C++, Pascal, Java, others will be
considered). OK, I've decided to be a bit more strict here. A reference
implementation should present the following interface:
void *sbxStreamAllocState;
int sbxStreamKey(void *State, u8 *Key, u8 *IV, int Keylen, int IVLen, int Direction);
int sbxStreamCryptBuf(void *State, u8 *Buffer, int BufLen);
void sbxStreamFree(void *State);
void *sbxBlockAllocState;
int sbxBlockKeyEnc(void *State, u8 *Key, int Keylen, int Rounds, int Direction);
int sbxBlockCryptBuf(void *State, u8 *Buffer, int BufLen);
void sbxBlockFree(void *State);
Only implementations presenting this interface (or one that can be easily
wrapped by these functions) will receive a speed score. Of course, if it's
written in Pascal, Java, etc then an equavalent set of functions should be
available for calling by the main sandbox program.To get a non-zero reference implementation score, an implementation must satisfy the following conditions:
Recommendations for reference implementations:
Reference implementations that provide no method of encrypting an arbitrary block of data in a thread-safe manner will automatically get zero for the reference implementation part. Implementations that fall into this category include programs where the entire encryption procedure is performed A reference implementation must be capable of both encryption and decryption. And it's got to actually *work* of course. Architecture independance is optional, though encouraged, but it must work on x86-32, with either MSVC or GCC. You can download the source code for the currently benchmarked ciphers, though no testing has been done outside MSVC. Currently, I have no way of benchmarking ciphers that do not compile in MSVC, so if you submit such a cipher, it will probably be a reasonable period of time before it gets a score. |
0.25 |
| Full explanation, detailing how encryption and decryption works. Ideally this should only contain psuedocode: any real code should be in the reference implementation. Please don't use any WYSISYG HTML editors or anything like that. Most produce code that only works in IE, and I have to severely damage it to get it to work for everyone else. Plain hand-coded HTML is fine, though, as long as you don't go overboard trying to make it look fancy. | 0.30 |
| Fully worked example of encrypting and decrypting a short message. This would link in well with the full explanation. If the cipher is trivial enough (ie: not much more complex than RC4) and well explained, then a worked example is pretty much uunnecessary and these points will be given. I will be the sole judge of whether it is trivial or not :) | 0.25 |
Reasonable amount of plaintext and ciphertext. For a cipher where the
algorithm is not supplied, the minimum requirements are:
For a cipher with a provided reference implementation, no text is strictly necessary as I can make up a challenge if you can't be bothered :) If you are submitting a challenge, then the minimum requirement is 4kb of known plaintext encrypted with the same key, and 1kb of challenge ciphertext. However this varies a bit with the type of cipher:
Of course, more plaintext is better, so if you want, feel free to add more varied plaintext in addition to the above. The challenge plaintext should be a standard English text, though HTML is also acceptable. Any deviation from standard English text must be mentioned. |
0.10 |
| Simplicity. Generally a full score of 0.1 is given here unless the design of the cipher is stupidly complex and unanalysable. | 0.10 |
Sp * (1-M*Sb) * Sc * sqrt(n)*ln(1+n)or just:
Constant * sqrt(n)*ln(1+n)Simple, eh :)