[mercury-users] cryptography / RC4

Sandy Harris sandy at storm.ca
Wed Feb 13 16:17:36 AEDT 2002


Ralph Becket wrote:

> Michael Roe at Microsoft Research in Cambridge has implemented
> some standard crypto algorithms in Mercury.  He used the "reversibility"
> made possible thanks to Mercury's mode system to describe the crypto
> relation once and get both encryption and decryption procedures
> depending upon which mode ((in, out) vs (out, in)) was used.  This is
> rather nice, since it halves the opportunity of introducing bugs in the
> implementation.

At least in theory, you could write a function of three arguments:

foo( plaintext, ciphertext, key )

Then 
	in, out, in	encrypts
	out, in, in	decrypts

but the interesting one is:

	in, in, out	solve for the key

You need a bit of extension. e.g. if the cipher uses 64-bit blocks and
a 128-bit key, then you need at least two plaintext/ciphertext pairs
before it becomes soluble.

Of course, for well-designed ciphers, this should be astronomically
difficult.

> On a related note, I know people at Cambridge Uni. have
> also toyed with the idea of using Mercury as a hardware description
> language whereby the same piece of code could be used to generate, say,
> both a multiplexer and a demultiplexer.  There's an interesting PhD in
> there somewhere if anybody's tempted... :)

There might be a PhD in the cipher stuff as well.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list