setupDESstate, des_key_setup, block_cipher, desCBCencrypt, desCBCdecrypt, desECBencrypt, desECBdecrypt, des3CBCencrypt, des3CBCdecrypt, des3ECBencrypt, des3ECBdecrypt, key_setup, des56to64, des64to56, setupDES3state, triple_block_cipher - single and triple digital encryption standard
void des_key_setup(uchar key, ulong schedule)
void block_cipher(ulong *schedule, uchar *data, int decrypting)
void setupDESstate(DESstate *s, uchar key, uchar *ivec)
void desCBCencrypt(uchar *p, int len, DESstate *s)
void desCBCdecrypt(uchar *p, int len, DESstate *s)
void desECBencrypt(uchar *p, int len, DESstate *s)
void desECBdecrypt(uchar *p, int len, DESstate *s)
unhandled troff command .in
unhandled troff command .ti
void triple_block_cipher(ulong expanded_key, uchar text, int ende)
void setupDES3state(DES3state *s, uchar key, uchar *ivec)
void des3CBCencrypt(uchar *p, int len, DES3state *s)
void des3CBCdecrypt(uchar *p, int len, DES3state *s)
void des3ECBencrypt(uchar *p, int len, DES3state *s)
void des3ECBdecrypt(uchar *p, int len, DES3state *s)
void key_setup(uchar, ulong)
void des56to64(uchar *k56, uchar *k64)
void des64to56(uchar *k64, uchar *k56)
The Digital Encryption Standard (DES) is a shared-key or symmetric encryption algorithm using either a 56-bit key for single DES or three 56-bit keys for triple DES. The keys are encoded into 64 bits where every eight bit is parity.
The basic DES function,
Since it is a bit awkward,
Electronic code book, using
Cipher block chaining mode, using
For both CBC and ECB modes, a stream of data can be encrypted as multiple buffers. However, all buffers except the last must be a multiple of 8 bytes to ensure successful decryption of the stream.
There are equivalent triple-DES (DES3-EDE) functions for each of the DES functions.
In the past, Plan 9 used a 56-bit or 7-byte
format for DES keys. To be compatible with the rest
of the world, we’ve abandoned this format.
There are two functions,
Single DES can be realistically broken by brute-force;
its 56-bit key is just too short.
It should not be used in new code, which should probably use