More comments on http://whiterose.sourceforge.net/r3proto.pdf:

> New Key Types
>
> The KHK is dead, long live the new key types. From the protocol point
> of view, a KSK is strictly a subset of the more general SVK keytype. The
> key type for SVK is 0x0201 and for KSK it s 0x0202.
>
> When you have a DataReply for one of these key types you need to check
> that Storable.Public-key hashes to produce that key.
>
> The data is in one large part DataLength bytes long and followed a
> single control byte. In the future the size of data of these key types
> will be limited. As you accept the data, update an SHA1 hash of it.
> Once you have DataLength bytes, generate the hash. Then check the
> signiture in Storable.Signiture using Storable.Public-key. These contain
> values in MPI format without the 2 length bytes, and are hex encoded
> (e.g. a3bc32...). The length bytes aren't needed because the length is
> known because the length of the string is known. Storable.Signiture
> contains 2 MPI's, seperated by a comma. These are r and s in the
> DSS signiture system. SVK's and KSK's have different, default shared
> moduli. They are known as GroupA (for KSK's) and GroupB (for SVK's).

Check the spelling of "signature".

Shouldn't there also be a description of how you generate the KSK hash
from the original searchkey string ("/music/teletubbies")?  Only clients
would have to know this but it is part of the definition of KSK.

> In SVKs only there may be a Storable.Group header that overrights the
> default group. This contains 3 MPI's (no length, hex encoded) that become
> the p, q and g in the DSS signiture system. They are comma seperated.
>
> If the control byte is CB_RESTARTED then an upstream node has found
> that the data is wrong. Switch back to message mode and expect a
> QueryRestarted. If the control byte is CB_OK and the signiture checks
> out, send CB_OK downstream (to whom you have been tunneling all this
> time). If you have CB_OK and the signiture fails, break the connection,
> send CB_RESTARTED and restart the query. You shouldn't ever talk to that
> node again.

"Overrides", not "overrights".

Are these values CB_RESTARTED and CB_OK defined elsewhere?  Do they
have any relation to the 0x01 and 0x00 values which are used in the
CHK description?  It would make sense to use the same values in both
places.

Hal

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to