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
// Compiles with Visual Studio 2008 for Windows | |
// This C example is designed as more of a guide than a library to be plugged into an application | |
// That module required a couple of major re-writes and is available upon request | |
// The Basic example has tips to the direction you should take | |
// This will work with connections on port 587 that upgrade a plain text session to an encrypted session with STARTTLS as covered here. | |
// TLSclient.c - SSPI Schannel gmail TLS connection example | |
#define SECURITY_WIN32 |
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 sys | |
# sbox from the tutorial | |
#sbox = [0xe, 4, 0xd, 1, 2, 0xf, 0xb, 8, 3, 0xa, 6, 0xc, 5, 9, 0, 7] | |
sbox = [0xf, 3, 0xa, 6, 4, 1, 0xb, 9, 0xe, 5, 0, 0xd, 2, 0xc, 7, 8] | |
SIZE_SBOX = len(sbox) | |
# compute the linear approximation for a given "input = output" equation | |
def linearApprox(input_int, output_int): | |
total = 0 |