Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

how do passwords work?

Name: Anonymous 2010-04-30 16:02

newbie here. so consider this paradox: let's say you have a pass protected rar file. now the password should be stored somewhere in the file to compare against the inputted password. so if it's there how come you cant just extract it?

Name: Anonymous 2010-04-30 16:06

>>1
Encryption.

Name: Anonymous 2010-04-30 16:09

so consider this paradox
Why does no-on on /prog/ ever use the word paradox correctly

Name: Anonymous 2010-04-30 16:25

I don't know anything about RAR encryption beyond the fact that it uses AES, but I'm assuming it just tries to decrypt with the password the user provides and errors out when the first few blocks don't form a legitimate RAR header. That would make a lot more sense than storing the password in the file, which would be a retarded idea..

Name: Anonymous 2010-04-30 16:48

>>1
Alternatively you can store the cryptographic hash of the password, which would be a bitch to reverse.

Name: Anonymous 2010-04-30 16:57

>>5
You could store it, encrypted.

Name: Anonymous 2010-04-30 17:12

>>4
The header is in the clear. Password mismatch is generally assumed when the checksums differ.

Name: Anonymous 2010-04-30 17:19

>>6
mind=blown

Name: Anonymous 2010-04-30 17:22

>>7
a checksum is really just a hash, so yeah, encryption.

Name: Anonymous 2010-04-30 17:24

>>7
There's certainly a cleartext header at the start of an encrypted RAR file, but do you have a citation for the presence of any checksum or any reason to believe the payload isn't just a straightforward encrypted RAR file? It's annoyingly hard to find good information on the topic (mainly thanks to idiots like >>1 who are just looking for crackers), and I don't particularly want to spend my evening poring over a clusterfuck of Sepples code.

Name: Anonymous 2010-04-30 17:43

I cannot believe that you responded to this.

Name: Anonymous 2010-04-30 17:43

>>10
I don't have references, just experience. An example is when I enter the wrong password my local unrar doesn't know for sure what's wrong, complaining of a bad CRC and suggesting that since it needs a password, perhaps I got it wrong. Otherwise bad CRC is always reported as a corrupt archive. I'd say that's fairly conclusive.

I know that the CRCs are not part of the payload (this would be pretty fucking stupid if you think about it.) However, there are two ways to produce rar files (encrypted or not), one is pkzip-style (a collection of compressed files) and the other is tgz-style (a compressed collection of files--"solid" compression.) It's common to use solid compression on the unencrypted format, and the other form on encrypted files (from observation.) I do believe these are the defaults for virtually every rar compressor, though I have found at least one encrypted rar with solid compression. With the solid encrypted format, from observation, there is still a CRC in the clear. I expect there are individual CRCs to be found in a subheader as well, but I really didn't check. I do believe there is a "TOC"/subheader is encrypted in this case, but I don't remember this part clearly.

Name: 12 2010-04-30 17:45

I do believe there is a "TOC"/subheader which is encrypted in this case,

Name: Anonymous 2010-04-30 17:51

>>12
From your description it really sounds more as if it's trying to decrypt the payload directly and then compare the results with a CRC in the header, and not at all storing a hash of the password anywhere. So >>9 is wrong.

Name: Anonymous 2010-04-30 18:00

>>14
No, there's certainly no password stored in the file (and there's really no need, since checksums are desirable even without encryption.) That is almost never the road taken to password protected files. The old utilities tended to use XOR without CRCs, but they could be cracked quickly (since XOR is fast) and easily by a substring search, unless the key is really long--like OTP.

But you could look at it as analogous to one-way password encryption in the sense that you have to match the CRC with the decrypted file. This analogy quickly falls apart when you investigate the nuances though.

Name: Anonymous 2010-05-01 7:27

ITT fucking idiots who don't know that:

1. The RAR file format (not compression algorithm) has official documentation

2. There are two opensource (not really "free", you RMS-obsessed neckbreads) implementations able to extract all versions of the format, including any combination of solid archiving and encryption

3. The defaults of all shipping RAR versions (there's only one RAR compressor) have been not solid and not encrypt headers ("file names" in UI and docs). Anything else has been explicitly specified by the user

The UnRAR source is fucking trivial to read, it took me literally 10 minutes to figure out the main compression algorithm, plus another 5 for the VM stuff. If you can't answer "why is 2040:1 the maximum compression ratio for the LZH backed" after looking at it for 5 minutes, well, you just suck. The PPMD backed I haven't really looked into. The actual container format is dead easy, I'm not answering your kindergarten questions.

Name: Anonymous 2010-05-01 7:50

>>16
Why is 2040:1 the maximum compression ratio for the LZH backed?

Name: Anonymous 2010-05-01 10:18

>>16
kill urself nub

Name: Anonymous 2010-05-01 10:39

>>18
The world4ch would be a much merrier place without you.

Name: Anonymous 2010-05-01 12:14

>>16
Are you counting WAHa's?

Name: Anonymous 2010-05-01 12:41

>>16
You're a bit late to this thread. And the compressor I had in the '90s did default to solid compression.

Name: Anonymous 2010-05-01 13:43

>>16
The official documentation sucks ass, and the ``opensource'' (sic) versions available from the RARlab website are in Sepples.

Name: Anonymous 2010-05-01 15:20

>>22
You call that Sepples? It only uses one or two innocuous Sepples features. You really don't need to know any Sepples to read it.

Name: Anonymous 2010-05-02 13:49

>>14
No, as in a CRC is just a hash of the data it's checking.

Name: Anonymous 2010-05-02 13:52

Still waiting on that infinite compression algorythm

Name: Anonymous 2010-05-02 14:00

>>25

main(){
return 0;
}
infinite compression.  The decompressor is left as an exercise to the reader.

Name: Anonymous 2010-05-02 14:07

>>24
It's not a hash of the password, which was your original claim, >>9-chan.

Name: Anonymous 2010-05-02 14:18

FUCKING MAGNETS, HOW DO THEY WORK?

Name: Anonymous 2010-05-02 14:29

>>28
magic

Name: Anonymous 2010-05-02 14:52

OP here. so consider another paradox: let's say you have a simple rar file. now you compress it with rar again. rar usually compresses files by 30-50%. so you compress it again and again and it's getting smaller. so the paradox: at some point it will become just a couple of bytes, how is that possible?

i think that's impossible b/c it would require infinite processing power but im not sure tho, whats your opinion guys?

Name: Anonymous 2010-05-02 15:07

>>30
WOW YEAH OMG INFINITE COMPRESSION IS POSSIBLES

Name: Anonymous 2010-05-02 15:07

>>30
That's why we have all those international conventions which prohibit using RAR any more than a few dozen times, otherwise there would be too many paradoxen.

Name: Anonymous 2010-05-02 15:07

>>30
dd if=/dev/urandom of=file.bin count=2000

Try compressing it now. I dare you!

Name: Anonymous 2010-05-02 15:24

>>30
When I was younger I knew this wouldn't work. However! I was a clever bastard, and I XOR encrypted the resulting file (with only a 32-bit key) and compressed again. Instead of wasting space (at optimal compression), I was able to get another roughly 10%. Lather, rinse, repeat--even with the same key1 the results continued to be favourable for as long as I cared to do it, which admittedly wasn't very long, for I was doing this with a 486 and each pass was taking longer and longer.

_________________________________________________________
1. Do you know the reason for this restriction?

Name: Anonymous 2010-05-02 16:22

>>34
1. Do you know the reason for this restriction?
Because the key was of type frozenvoid*.

Name: Anonymous 2010-05-02 19:40

>>33
that's easy if your entropy pool is low, since /dev/urandom never blocks.
unless you're using a superior operating system like freebsd.

Name: Anonymous 2010-05-02 20:06

>>36
The fact that /dev/urandom never blocks doesn't mean it'll just put out a series of 0s once its entropy runs out. Random noise generated by a PRNG is just as incompressible as ``genuine'' randomness.

Name: Anonymous 2010-05-02 21:21

>>37
Random noise generated by a PRNG is just as incompressible as ``genuine'' randomness.
That is inherently untrue in principle, with a caveat. Practically speaking, though, bzip isn't going to do the trick.

The caveat being that a system with sufficiently greater resources could generate a sequence that in principle could not be compressed by a system with inferior resources, though abstractly it is still a compressible sequence.

Name: Anonymous 2010-05-02 22:11

American garbage: deflate/gzip/zlib, zip "encryption"
English mediocrity: bzip(2)
Russian glory: rar/ppmd/lzma, rar/7z encryption; Alex Ratushnyak winner of Hutter Prize and Calgary Corpus Compression Challenge

Name: Anonymous 2010-05-02 23:43

>>39
gzip + advancecomp beats bzip2 every time, and usually beats lzma.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List