Conversation started Feb 1, 2012 at 18:41.
Feb 1, 2012 18:41
hello !
I have a little brain teaser for you guys which I can't resolve myself, I'm sure someone here will be interested :)
With a tip which may be useful Are you able to decrypt it?
- Well, I'm a little stumped. 3DES uses 24-byte keys, but that's a 32-byte key. Unless there's some trickery involved.
oopsie
fail on the paste... sorry !
Key sizes 168, 112 or 56 bits
from wikipedia.
or is it DES
For the context the reddit user named "A858DE45F56D9BC9" posts at (seemingly) random intervals message consisting of bunches of base64 strings, generally possesing some strange duplicate strings in a way which doesn't seem to indicate padding (maybe a few headers concatenated ?). See here for more: reddit.com/user/A858DE45F56D9BC9
@Mvy I was just looking into that
0
Q: Should a pentest report include the tester's opinion?

Jeff FerlandIn this particular case, the webserver turned out to be a shared 3rd party system and was not tested. Examples: We do express grave concern at the overall security posture of that webserver and the possible exposure to $client In general, it is our feeling that $client is a low-profile,...

@RoryAlsop Especially for you since you've got the whole public accounting / pentest background :)
Feb 1, 2012 18:58
@JeffFerland Will draft you up a wee answer - this is exactly my space :-)
@Mvy Interesting: "As mentioned above, a triple DES key is a bundle of three DES keys. A DES key is 64 bits long, but only 56 bits of these are used in the encryption process.
A triple DES key is therefore 3 x 64 = 192 bits long, but the keyspace is only 3 x 56 = 168 bits. " - Source: http://www.cryptosys.net/3des.html
Context (part 2): That user, "A858DE45F56D9BC9" or the admin on reddit have deleted multiple times previous posts (for an unknown reason, at least to me) but knowing the community someone must have copies of those, if that message can be decrypted I will ask them happily :)
/me loves the "xxx" and "food" tags !
Feb 1, 2012 19:13
@JeffFerland is that useful or you need more - tried to give a general + specifics answer
Feb 1, 2012 19:55
So, I just got an email from @Rebecca about gifts and moderator election. Anyone know what it is?
@ScottPack is this in addition to your swag?
Yeah, it just came in.
I think it's a consolation prize for not winning
:-)
where did you come in the results?
@RoryAlsop I can't remember. You and Avi were shoe-ins for 1/2. Then, depending on which reallocation settings one used, the rest of us all tied for 3rd->last place
what about Hendrik? :-)
heh
That's good that you're getting some goodies though
nice touch
Feb 1, 2012 20:07
They just don't say what. It's listed in the email as a "nice gift" but the google-docs form asks for "black or white" as well as size.
So, probably, a t-shirt, but still a bit ambiguous
maybe it's a codpiece - do they give size as S, M and L?
;-)
@Scott I got that too apparently
@Shadok It's not a 32-byte key, it is a 32-character hexadecimal string, thus encoding a 16-byte value -- i.e. 128-bit, which is a key length supported by 3DES.
@RoryAlsop I like the way you're thinking. How awesome would a sec.se branded codpiece be? The toothy lion right out front?
@ThomasPornin great news so ! Thanks for that answer, I'll try to hack something in python but I'm not at ease at all
I'm just thinking openssl should b able to decrypt it, I'll just try it now :)
Feb 1, 2012 20:16
@Shadok The putative IV is more of a concern: 8 characters, apparently hexadecimal too, so this probably encodes a 32-bit IV. If encryption uses CBC, then it should have a 64-bit IV.
@ThomasPornin For me IVs are the equivalent of salts in hashes, am I (approximately) right ?
@Shadok Approximately, yes.
But they must have a specific format, depending on the encryption mode.
For instance, CBC encryption means: before encrypting each block, XOR it with the previous encrypted block.
The IV is the conventional "previous encrypted block" for the first block of the message.
So it must have the same length than the block length (8 bytes for DES / 3DES)
I'm looking at that right now, that page is full of details :) openssl.org/docs/apps/enc.html (3des is supported in many modes cbc, ecb, ofb...)
Also, for security, an IV for CBC must be randomly generated with a strong PRNG
I think I'm understanding that (from a conceptual, not mathematical point of view)
Feb 1, 2012 20:20
whereas salts in password hashing are often used as part of the input to hash functions, so their length is more arbitrary and there are less requirements on their contents (we need salt values to be unique, but there is no need for unpredictable randomness).
In cryptography, modes of operation is the procedure of enabling the repeated and secure use of a block cipher under a single key. A block cipher by itself allows encryption only of a single data block of the cipher's block length. When targeting a variable-length message, the data must first be partitioned into separate cipher blocks. Typically, the last block must also be extended to match the cipher's block length using a suitable padding scheme. A mode of operation describes the process of encrypting each of these blocks, and generally uses randomization based on an additional input...
That Wikipedia page contains good schematics.
"Un petit dessin vaut mieux qu'un long discours." ("A small drawing is better than a long text." -- attributed to Napoleon)
I already searched and read a few papers on this but the schemas are really obscure for me ("S-boxes ? I heard there are some in blowfish which it's also used as a prng for scrypt" but that's where my comprehension stops due to my lack of skills in math/crypto :) ) Anyway it's always good to be told where to look precisely, I'll have a look at this article.
ahah, i'm french, I already used that quote :)
AES uses S-Bowes
I'll continue my search for 3DES modes specs for a few minutes, worst case i'll search through comments in libssl source code
@Shadok A S-Box is basically any function, with normally short inputs and outputs, which accepts no better definition than a list of input+output pairs
It's historical
@Mvy are you telling me i'm wrong ? that would be pretty fun (and proving my point at the same time) !
Feb 1, 2012 20:28
Well I'm not so much in it today, but I think I read in my theory of code book about S-Boxes in AES. But it is use for other codes too I guess
@ThomasPornin ok, i'm looking at the article :)
DES uses internally 8 functions which were defined as taking 6 bits of input, and producing 4 bits of output, and the DES specification simply listed the output for each function and each possible 6-bit input (there are 64 of them). That specification called them "S"
hence the term "S-box"
it really means: a function which is not an addition / subtraction / XOR / multiplication
It should have interesting properties too
Don't remember what exactly: non linearity? or things like this?
why does that seems like compression to me ? "6 bits input, 4 bits output", I'm must be missing soomething else
hashing would be better term I guess
Cause I bet you can't go back from the 4 to 6
Feb 1, 2012 20:31
@ScottPack ewwwww (or maybe: coooool)
@RoryAlsop Wouldn't match your colou?r scheme, unfortunately.
@Mvy S-boxes are relatively expensive in software implementation, precisely because they do not map well on what a CPU is best at doing. So designers use them only to get some properties which they would find difficult to get otherwise, such as non-linearity or avalanche effect.
@ScottPack Spray paint
@mvy oh ! ok in this case it makes sense but I jsut don't now yet the use of the output, I'm going to read that wkipedia page right now and get back when i'm done cause i need a few minutes
@RoryAlsop And cover up the brand?
Feb 1, 2012 20:32
stencils and spray paint (picky picky)
@ThomasPornin @Mvy Even if the description seems really clear to me here en.wikipedia.org/wiki/S-box I can't figure what is the output used for after that, i just lost a third of my information
@Shadok DES is defined as 16 successive rounds; each round mixes the current 64-bit states by applying various transforms, including duplicating some of the bits, XORing with a subkey (generated from the DES key), splitting the resulting 48-bit value into 8 6-bit word, applying the 8 S-boxes on these 8 value, concatenating again the 8x4 = 32 bits of output, and permuting these bits.
... or we can reconstruct the s-box state from the key and find the coordinates of our encrypted input in the s-box to "decrypt" it ? That would make sense given the article cites the term of "confusion" as used by Shannon (which happened to interest me)
@Shadok I would have to read that AES thing from the beginning.
So each S-box is one elementary operation, among others, used in the definition of DES.
For AES, there is one S-box but it is applied 16 times per round, with other operations (and there are 10 rounds)
Feb 1, 2012 20:42
does that mean their only interest is in slowing the decryption process as salts do ? (even if there are IVs too in encryption which is used later)
@Shadok No, not at all
For encryption, we really want things to be fast
Slowness for password hashing is a kludge to deal with the inherent sloppiness of passwords.
But for all other parts of crypto, we really aim at top speed.
I tought there would be an equivalent in crypto
Great place here, come and blast your brain with crypto ^^ A bit hard but delightful anyway !
so instead of slowing the process you just "Enlarge you space" ? (yes I meant "search space" but I had to say it)
And while I'm thinking about it, isn't there already a place to store interesting things like the one I mentionned (that's a coompletely subjective point of view), maybe a page in a wiki ?
Or could it be accepted as a question ? If so I'm posting it right now.
Feb 1, 2012 21:29
@RoryAlsop That's quite helpful. Had a little debate about opinion in the non-cpa-opinion sense and wanted some outside feedback.
@JeffFerland cool - I can go into bits in more detail if needed, but I'm finding I can't be bothered with all the corporate BS when outside work :-)
@RoryAlsop No reason to drag you down :)
No - wasn't a dragging down, was just explaining my summary versions rather than long paragraphs
Feb 1, 2012 21:45
@RoryAlsop I hear that one has trouble keeping things like that going as they get older.
@ThomasPornin I'll be back tomorrow but i may leave the window open for a few hours, I'll get back to you when I have time and maybe post my first links as a question, that could turn interesting. Thanks again for your kind explanations even though I can get a good hold on them, have a nice day and keep flowing those good answers on stackX !
 
Conversation ended Feb 1, 2012 at 21:46.