[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Clarifying the qualities we desire the DIGEST-MD5 replacement to have
Hallvard B Furuseth <h.b.furuseth@xxxxxxxxxxx> writes:
> Chris Newman writes:
>> Nice-to-have features:
>> (...)
>> * Textual protocol like CRAM-MD5 over binary protocol that's harder
>> to test/debug
>
> I don't get this. SASL is not a protocol. If a textual protocol _uses_
> SASL, it must turn SASL blobs into text - e.g. by base64-encoding them.
> If the SASL mechanism also base64-encodes, we get base64(base64(data)).
CRAM-MD5 uses hex encoding, so it will be base64(hex(data)). I would
recommend against using base64 in the mechanism for this reason. Base64
is considerably more error prone to implement than hex encoding.
This wastes a few bytes, yes, but I don't think the difference is
significant.
> If you are thinking of text vs ASN.1 I agree ASN.1 is harder to examine,
> but there are plenty of middle ways. E.g. a fixed-field format with a
> field separator need not be textual. And such binary fields could still
> start with 'token=' to identify them when you read the protocol.
Hex encoding the data as well doesn't cost much, and allows for simpler
string handling in some programming languages.
/Simon