This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch.utils import cpp_extension | |
from setuptools import setup, find_packages | |
import subprocess | |
import sys | |
import warnings | |
import os | |
# ninja build does not work unless include_dirs are abs path |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
/* | |
Reference BITSLICED implementations of: | |
KATAN32, KATAN48, KATAN64, KTANTAN32, KTANTAN48 and KTANTAN64. | |
Each of the 64 slices corresponds to a distinct instance. | |
To work with a single instance, use values in {0,1} | |
(ie, only consider the least significant slice). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <iostream> | |
#include <cstring> | |
// Sbox шифра TWINE | |
int sbox[] = {0x0C, 0x00, 0x0F, 0x0A, 0x02, 0x0B, 0x09, 0x05, 0x08, 0x03, 0x0D, 0x07, 0x01, 0x0E, 0x06, 0x04}; | |
int shuf[] = {5, 0, 1, 4, 7, 12, 3, 8, 13, 6, 9, 2, 15, 10, 11, 14}; | |
int shufinv[] = {1, 2, 11, 6, 3, 0, 9, 4, 7, 10, 13, 14, 5, 8, 15, 12}; |
NewerOlder