forkskinny.h 783 Bytes
Newer Older
lwc-tester committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
/**
 * The ForkSkinny construction.
 * 
 * @file forkskinny.h
 * @author Antoon Purnal <antoon.purnal@esat.kuleuven.be>
 */

#ifndef FORKSKINNY_H
#define FORKSKINNY_H

#include <stdint.h>

enum encrypt_selector {
    
    ENC_C0, // "Left" block
    ENC_C1, // "Right" block
    ENC_BOTH // Both blocks

};

enum inversion_selector {
    
    INV_INVERSE, // Plaintext block
    INV_OTHER, // Other ciphertext block
    INV_BOTH // Both blocks

};

void forkEncrypt(unsigned char* C0, unsigned char* C1, unsigned char* input, const unsigned char* userkey, const enum encrypt_selector s);
void forkInvert(unsigned char* inverse, unsigned char* C_other, unsigned char* input, const unsigned char* userkey, uint8_t b, const enum inversion_selector s);

#endif /* ifndef FORKSKINNY_H */