Skip to content

Instantly share code, notes, and snippets.

View GeorgyFirsov's full-sized avatar
🏡
Working from home (actually I don't)

Georgy Firsov GeorgyFirsov

🏡
Working from home (actually I don't)
View GitHub Profile
@odzhan
odzhan / tlsclient.cpp
Created June 7, 2022 00:06
C++ SSPI Schannel TLS example
// 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
@mimoo
mimoo / linear_approx_table.py
Last active May 10, 2024 17:21
calculate linear approximation tables for Sboxes
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