[mercury-users] functions returning in values?

Ralph Becket rbeck at microsoft.com
Wed May 9 01:41:40 AEST 2001


> From: Tomas By [mailto:T.By at dcs.shef.ac.uk]
> Sent: 08 May 2001 16:04
> >
> > (youre thinking of one-way hash functions, while ralph was talking
> > about ciphers, I believe)
> 
> um, he actually says "cipher function" explicitly, I notice now

A cipher is indeed a function.  It is also a bijection if the
key is fixed, which is the property we want to exploit.

The ciphertext -> key * plaintext relation may well be one to many.

Even so, I'm fairly sure I could come up with a simple cipher and a
Mercury program implementing it that would support an extra mode of

:- pred cipher(plaintext, key, ciphertext).
...
:- mode cipher(out, out, in) is multi.   % Or at least nondet.

Of course, you would be unlikely to want to use the procedure derived
from such a mode for a cryptographic attack...

Ralph
--------------------------------------------------------------------------
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