Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tcllib and sha512 ?

168 views
Skip to first unread message

Andreas Leitgeb

unread,
Dec 9, 2012, 5:11:50 PM12/9/12
to
Googling for tcl and sha512 gave me a few results of people
claiming that sha2 from tcllib was supposed to contain
functions for sha512, but as it seems, 1.14 is the latest
version of tcllib and it is the version installed on my
ubuntu machine and I can't see anything about sha512 in
it (not even with grep in the tcllib dir).

Is there some "hidden" prerelease for some newer tcllib,
or has someone done it already and just not yet shared it
out of believe that no one else would need it, anyway? ;-)

PS: actually I'd have fancied some tcl-only "hmac-sha512" -
for now I'm exec'ing php just for that function.

Twylite

unread,
Dec 10, 2012, 6:27:57 AM12/10/12
to a...@logic.at
On Monday, 10 December 2012 00:11:50 UTC+2, Andreas Leitgeb wrote:
> Googling for tcl and sha512 gave me a few results of people
> claiming that sha2 from tcllib was supposed to contain
> ...
> PS: actually I'd have fancied some tcl-only "hmac-sha512" -
> for now I'm exec'ing php just for that function.

Tclcrypt (http://dev.crypt.co.za/tclcrypt/index) is a C extension that provides bindings from LibTomCrypt to Tcl. It supports all SHA2 family algorithms, and many others.

Andreas Leitgeb

unread,
Dec 10, 2012, 8:51:10 AM12/10/12
to
Thanks for the pointer, but as of now, calling out to php is still somewhat
less hassle, and good enough for now. (speed doesn't matter in my case)

If at some point sha512 (and related hmac) would make it into
tcllib's sha2 module, that would still be fine, though.

Carson Chittom

unread,
Dec 10, 2012, 6:47:53 AM12/10/12
to
I don't know about tcllib, but if what you're looking for is to stop
using PHP, why not just use OpenSSL, which is probably already installed
for other programs? I.e.,

$ openssl sha512 filename.txt

You can exec that just as easily, I'd think.

Andreas Leitgeb

unread,
Dec 11, 2012, 8:28:13 AM12/11/12
to
Carson Chittom <car...@wistly.net> wrote:
> Andreas Leitgeb <a...@gamma.logic.tuwien.ac.at> writes:
>> PS: actually I'd have fancied some tcl-only "hmac-sha512" -
>> for now I'm exec'ing php just for that function.
> I don't know about tcllib, but if what you're looking for is to stop
> using PHP, why not just use OpenSSL, which is probably already installed
> for other programs? I.e.,
> $ openssl sha512 filename.txt

I had done a couple of experiments with openssl, already, but they all
had a flaw in it, as I see now: I had tried openssl dgst -sha512 -hmac ...

Seeing your "openssl sha512 ...", I made new experiments, and
[exec openssl sha512 -hmac $key << $data]
gave me the expected (i.e. same as php's) result :-)

Thanks!

PS: I do perceive calling openssl instead of php as an improvement :-)
0 new messages