Re: a makeshift hash solution
From: Tom St Denis (tomstdenis_at_gmail.com)
Date: 01/05/05
- Next message: Tom Foolery: "Re: a makeshift hash solution"
- Previous message: Tom Foolery: "Re: a makeshift hash solution"
- In reply to: Tom Foolery: "Re: a makeshift hash solution"
- Next in thread: Tom Foolery: "Re: a makeshift hash solution"
- Reply: Tom Foolery: "Re: a makeshift hash solution"
- Reply: ny152: "Re: a makeshift hash solution"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 04 Jan 2005 23:21:27 -0500
Tom Foolery wrote:
> Tom St Denis wrote:
>
>>Tom Foolery wrote:
>>
>>>what is this PK stuff?
>>
>>Public key.
>
>
> I figured as much. But how would I use a public key system to protect
> my keys? Unless you mean I should just forego my cipher and use public
> key system.
Um, the idea would be to forgo the "key library".
>>I still want to know what you mean by "keys in library".
>
>
> The way I'm storing keys right now is I put the number of keys, then I
> put the hash of the key, then I put the key. For example:
>
> 002
> 38c0971ba9079de3
> 11112222333344445555666677778888
> 1b9df47ac037be42
> 49ebc91de9304acbe18df39bd3
>
> then the program reads them into a list when the user tells it to.
> then when you decode a file with the correct formatting, it'll parse
> the hash that's in the file and compare to the hashes in the list. if
> it isn't there it'll say you don't have the key. of course, you can
> force a decipher with any key you want if you think the program is
> mistaken...
Why do you have multiple keys then? [I'm trying to understand the
problem you are trying to solve].
>>A MAC [message authentication code] is not a hash. Why not find out
>>what they both are and compare for differences?
>>
>
>
> Oh, you're just being picky now. So a MAC is keyed and a hash is
> unkeyed. In that case, I've been using a MAC all along. The way my
> function works is I use the given key to encipher a block of nulls,
> then I use that ciphertext as the key on another, shorter block of
> nulls. That's my 'hash' function.
Except that's not a hash or MAC. A hash is an unkeyed one-way
transformation of a message [with certain desireable cryptographic
properties]. A MAC is a like a hash except that only the key holder can
produce/verify the output [and forging takes 2^k time not 2^(k/2) time].
You would MAC the ciphertext [either in blocks or as a whole] and an
invalid MAC would arise from either tampered ciphertext or an invalid
input key. I usually just say "invalid mac" and document that it could
be from an invalid password. That way you don't have to give the
attacker additional information about the key.
Tom
- Next message: Tom Foolery: "Re: a makeshift hash solution"
- Previous message: Tom Foolery: "Re: a makeshift hash solution"
- In reply to: Tom Foolery: "Re: a makeshift hash solution"
- Next in thread: Tom Foolery: "Re: a makeshift hash solution"
- Reply: Tom Foolery: "Re: a makeshift hash solution"
- Reply: ny152: "Re: a makeshift hash solution"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|