[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-apl] Some Crypto

From: Mike Duvos
Subject: [Bug-apl] Some Crypto
Date: Thu, 10 Sep 2015 07:13:18 -0700

The attached transfer file contains an implementation of the SHA-256 message digest function, described in FIPS 180-4, as a collection of APL objects.  This is an excellent test of doing large numbers of single-bit operations in APL.

The function HASH computes the message digest of a character string using SHA-256, and returns the result as a lower case hexadecimal character string.

      HASH 'The Magic Words are Squeamish Ossifrage'

We can hash something a bit longer, and time it, first in APL2 on my Dell Dimension 2400.


      TIME 'HASH 10000⍴''X'''
2.797 Seconds.

And next in GNU APL on my Amazon instance of Ubuntu Server, again with instrumentation disabled.


      TIME 'HASH 10000⍴''X'''
2.481 Seconds.

So this is another example of a calculation where GNU APL is quite competitive with IBM's APL2 product.

Attachment: HASH.atf
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]