Language

Pliant cryptographic system

Secured channel implementation

It's implemented in /pliant/util/cryto/channel.pli

MD5 digest

A MD5 digest is a 128 bits value.
The rule is the following: nobody is able to build from scratch a message that would return a given digest value. So, if you received a digest value (it's short) through a secured channel, then when you receive the message (it can be arbitrary long) through an unsecured channel, then if the digest matches, you know the message has not been altered.
The fact it still holds on today computers is an open question.

var Str s := string_md5_binary_signature "text to sign"

returns the MD5 digest of the message as a 16 characters long string. The characters in the string can have any value from 0 to 255, so that the returned string may well be not printable, and even not a valid UTF8 string.

var Str s := string_md5_hexa_signature "text to sign"

returns the MD5 digest of the message as a 32 characters long string. The characters in the returned string as all in the range 0 to 9 or A to F, so the string is a 32 digits hexadecimal number.

var Str s := file_md5_binary_signature "file:/tmp/foo"

returns the MD5 digest of the file content as a 16 characters long string containing any characters.

var Str s := file_md5_hexa_signature "file:/tmp/foo"

returns the MD5 digest of the file content as a 32 characters long string representing a 32 digits hexadecimal number.