This file contains hidden or 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> | |
#include <string.h> | |
int main() { | |
int a,b,c; | |
unsigned char i[255]={142,152,205,62,241,152,80,107,150,171,160,121}, g=29, t[255]={1}, s[12], z; | |
memset(i+12,0,243); memset(s,0,12); for (a=1; a<255; t[a++]=t[a-1]<<1^(t[a-1]&128?g:0)); | |
printf("Input: "); fgets(i+12,243,stdin); while (i[11+strlen(i+12)]<32) i[11+strlen(i+12)]=0; | |
for (b=strlen(i); b>=0; i[b%12]^=i[b], b--) |
This file contains hidden or 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
{-# LANGUAGE OverloadedStrings #-} | |
import Data.List | |
import qualified Data.ByteString.Lazy.Char8 as BS | |
import Data.Char | |
import Data.Monoid | |
import Data.Either | |
import Data.Int | |
import Data.Function | |
import Data.Functor |
This file contains hidden or 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
return [32,62,62,61,32,92,100,32,45,62,32,109,97,112,77,95,32,112,117,116,83,116,114,32,91,34,114,101,116,117,114,110,32,34,44,32,115,104,111,119,32,100,44,32,109,97,112,32,99,104,114,32,100,93,10] >>= \d -> mapM_ putStr ["return ", show d, map chr d] |
This file contains hidden or 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
/* | |
* AES NI | |
*/ | |
.macro KEYGEN rc off | |
aeskeygenassist \rc, %xmm0, %xmm1 | |
pshufd $255, %xmm1, %xmm1 | |
movdqa %xmm0, %xmm2 | |
pslldq $4, %xmm2 | |
pxor %xmm2, %xmm0 |