Nmap Development mailing list archives

Re: [NSE][PATCH] OpenSSL bindings for NSE


From: Sven Klemm <sven () c3d2 de>
Date: Thu, 04 Sep 2008 22:58:16 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ron wrote:
| Sven Klemm wrote:
|> Hi,
|>
|> I've updated the openssl bindings. The module is now built as a static
|> module. The module is built when OpenSSL is available and Lua is
enabled.
|>
|> The module currently includes all the functions I needed for writing
|> the SSH hostkey script, which are mostly bignum functions. I've also
|> added documentation for the included functions.
|>
|> Any opinions about integrating this into nmap?
|>
|> Cheers,
|> Sven
|
| So aside from all the talk about requiring openssl/gracefully
dying/etc.
| How difficult would it be to add bindings for the major
| encryption/hashing functions (md4, md5, sha1, hmac, des, aes, etc)?
| Those could come in really handy for me, but I don't really want to
mess
| around with that stuff myself.

Adding furthing functions is trivial. I am not yet sure about the best
interface for the hashing functions though.
These are the possibilities I see:
- - add two functions for each algorithm one producing binary data the
other producing a hexencoded string
- - add a flag to the function signature controlling whether binary data
or a hexencoded string should be returned
- - only create functions producing binary data and do the conversion
with bin.unpack
- - only create functions producing binary data and add a to_hex
function to the lua string class

I favor adding a to_hex method to the lua string class because this
will result in the least code duplication and will also be a very nice
addition as you can easily transform any string into a hexencoded
string. It is a change to liblua though but the change is quite
minimal and in my opinion extremely useful and as liblua is included
in the nmap code I think modifying it is okay.

Cheers,
Sven


- --
Sven Klemm
http://cthulhu.c3d2.de/~sven/

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjAS+gACgkQevlgTHEIT4Zw4gCfW2F8aEJOH1rO66W4nBkOLjR/
AvgAniGbrOSj54dSGM23ndM/pqp/koM2
=9XTB
-----END PGP SIGNATURE-----

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


Current thread: