A few comments.
Implement name2addr utility method.
Implement addr2name utility method.
Make DS from DNSKEY.