Skip to content

Instantly share code, notes, and snippets.

View dexXxed's full-sized avatar
🐍
Nice to see you here

dexXxed

🐍
Nice to see you here
View GitHub Profile
@dexXxed
dexXxed / setup.py
Created July 12, 2021 07:55
APEX FIXED
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
@dexXxed
dexXxed / solar.ipynb
Last active October 17, 2020 19:00
Solar.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dexXxed
dexXxed / katan.c
Created June 18, 2020 19:22 — forked from raullenchai/katan.c
The KATAN/KTANTAN Family of Block Ciphers
#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).
@dexXxed
dexXxed / twine.cpp
Last active June 18, 2020 18:54
TWINE Cipher implementation, written on C++
#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};