Category Archives: cryptography

Emulation of AESENC and AESENCLAST instructions in x86 assembly

Introduction aesenc and aesenclast are AES-NI instructions impelemented on the x86 architecture. Recently, a well known cryptographer J.P Aumasson published code to emulate these instructions in C, which would be very useful for emulators, and virtual machines in general. The … Continue reading

Posted in assembly, cryptography, encryption, security | Tagged , , , , , , , | Leave a comment

WanaCryptor File Encryption and Decryption

Introduction This is a quick post about the WanaCryptor ransomware wreaking havoc on many networks across the world this weekend. With all the news coverage, most of you already know the trouble caused by it. Once executed on a system, … Continue reading

Posted in cryptography, encryption, malware, public key exchange, security, windows | Tagged , , , , , , , , | 8 Comments

Shellcode: A Windows PIC using RSA-2048 key exchange, AES-256, SHA-3

Introduction This won’t be a tutorial on writing shellcode although you might glean something useful from the source code when writing your own PIC in C. This is a PIC (Position Independent Code) for the Windows Operating System written in … Continue reading

Posted in assembly, cryptography, diffie hellman merkle, networking, programming, public key exchange, security, shellcode, windows | Tagged , , , , , , , | 1 Comment

Windows: Interactive shells Part 4

Introduction Just to summarize what we’ve looked at so far in parts 1-3 Create a simple shell where a socket is assigned to stdin, stdout and stderr of cmd.exe. Use synchronization to handle unexpected closure of socket or termination of … Continue reading

Posted in cryptography, networking, programming, security, windows | Tagged , , , , , , , , | 1 Comment

Windows: CTR mode with Crypto API

Introduction CTR mode turns a block cipher into a stream cipher. The concept was proposed by Whitfield Diffie and Martin Hellman in their 1979 publication, Privacy and Authentication: An Introduction to Cryptography. Unfortunately, CTR mode isn’t supported out of the … Continue reading

Posted in cryptography, programming, windows | Tagged , , , | 2 Comments

SPEKE (Simple Password Exponential Key Exchange) using OpenSSL

Introduction David P. Jablon published a paper in 1996 called Strong Password-Only Authenticated Key Exchange where he describes a new protocol based on Diffie-Hellman-Merkle key exchange. Diffie-Hellman key exchange is susceptible to MITM attack but with just Modular Multiplication and … Continue reading

Posted in bspeke, cryptography, diffie hellman merkle, encryption, key exchange protocol, oakley groups, openssl, prime numbers, programming, public key exchange, security, speke, wspeke | Leave a comment