BIND 10 #782: Implement cryptographic API using Botan

BIND 10 Development do-not-reply at isc.org
Tue May 10 20:04:47 UTC 2011


#782: Implement cryptographic API using Botan
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  hanfeng
  stephen                            |                Status:  reviewing
                       Type:         |             Milestone:
  enhancement                        |  Sprint-20110517
                   Priority:  major  |            Resolution:
                  Component:         |             Sensitive:  0
  Unclassified                       |           Sub-Project:  DNS
                   Keywords:         |  Estimated Difficulty:  3.0
            Defect Severity:  N/A    |           Total Hours:  0
Feature Depending on Ticket:  tsig   |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by vorner):

 * owner:  vorner => hanfeng


Comment:

 Hello

 I have some comments:
  * Would you like to propose a changelog entry?
  * The use of macros is generally avoided inside the Bind 10 code. And as
 the standard guarantees that size of uint8_t is 1, you could directly use
 sizeof instead of the macro, which is IMO cleaner. And the macro is wrong
 anyway (well, because of the uint8_t having size of 1, it doesn't show),
 since the HMAC functions take a generic unstructured buffer and length in
 bytes, not in elements.
  * The test function is rather long and it tests 3 different algorithms.
 If one of them failed, we wouldn't know which one of them it is. May I
 suggest splitting the test into 3? If you're concerned about the total
 code length, because you're reusing some parts, maybe creating a function
 that would be passed bunch of expected buffers and secrets and a name of
 the algorithm and it would run them would help. Such function could just
 be called from the 3 different tests (and maybe the original functions for
 MD5 and SHA* could use it as well).
  * This is not comment directly to your code, but the UNKNOWN_HASH
 constant is the next number, which gets increased every time a new
 algorithm is added. But let's assume there was an older version of the
 library talking with something newer. The library returns 3 to indicate
 unknown algorithm. But the new code understands hash 224. Would it be
 reasonable to set unknown hash to some almost infinity, like 255, to avoid
 this potential problem in future (I don't think it could be problem right
 now, with the number of users we currently have)?
  * (For future commits it might be useful to set your email address in
 git)

 With regards

-- 
Ticket URL: <http://bind10.isc.org/ticket/782#comment:10>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list