Nmap Development mailing list archives

Re: [RFC] Lua bindings for OpenSSL md5 and sha1 hash functions


From: Thomas Buchanan <tbuchanan () thecompassgrp net>
Date: Fri, 07 Dec 2007 12:25:14 -0600

Matthew Boyle wrote:
i think it would be better to have separate functions for the raw digest output, 
rather than using the boolean field.  digest_{md5,sha1}_raw(), perhaps?


I have no strong preference either way.  The library I used had it with the 
optional boolean flag, and I noticed the LuaCrypto library you mentioned 
also did it that way.  One question that comes to mind if it's split into 
separate functions is do you still have the hex output as the short function 
name, or do you have digest_{md5,sha1}_hex()?

Or, would you prefer to have the API that LuaCrypto has, where there is only 
a single function for digests, and the hash algorithm to be used is passed 
in as an argument?  Then you would have digest(algo, string, raw) or perhaps 
digest(algo, string) and digest_raw(algo, string).


at some point i intend to finish off the X509 bindings i started last year.

i remember someone expressing an interest in having some interface for 
creating ASN.1 objects, for SNMP and the like.  openSSL would be one way to 
provide that, since plenty of people will already have it available.  on the other 
hand, the API looks quite nasty, and there doesn't seem to be a whole lot of 
documentation...


A method for parsing ASN.1 would be handy, but I'm not sure OpenSSL is 
optimally suited for it.  Perhaps libtasn1 ( http://josefsson.org/libtasn1/ 
) would be a little simpler?

Thanks for the feedback,

Thomas

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: