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
#ifdef __EMSCRIPTEN__ | |
#include <emscripten.h> | |
#include <SDL.h> | |
#include <SDL_opengles2.h> | |
#else | |
#include <SLD2/SDL.h> | |
#include <SDL2/SDL_opengles2.h> | |
#endif | |
#ifndef M_PI | |
#define M_PI 3.14159265358979323846 |
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
//Starter code for https://leetarxiv.substack.com/p/paraxial-ray-tracing-in-sdl2-emscripten | |
#ifdef __EMSCRIPTEN__ | |
#include <emscripten.h> | |
#include <SDL.h> | |
#include <SDL_opengles2.h> | |
#else | |
#include <SLD2/SDL.h> | |
#include <SDL2/SDL_opengles2.h> | |
#endif | |
#ifndef M_PI |
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
//Details: https://leetarxiv.substack.com/p/mediant32-intro?r=2at73k | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <stdint.h> | |
#define m32_ENABLE_ERRORS 1 | |
#define m32_TRUE 1 | |
#define m32_FALSE 0 | |
#define PRINT_ERROR(msg) \ | |
do { \ |
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
#ifdef __EMSCRIPTEN__ | |
#include <emscripten.h> | |
#include <SDL.h> | |
#include <SDL_opengles2.h> | |
#else | |
#include <SLD2/SDL.h> | |
#include <SDL2/SDL_opengles2.h> | |
#endif | |
#ifndef M_PI | |
#define M_PI 3.14159265358979323846 |
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
#ifdef __EMSCRIPTEN__ | |
#include <emscripten.h> | |
#include <SDL.h> | |
#include <SDL_opengles2.h> | |
#else | |
#include <SLD2/SDL.h> | |
#include <SDL2/SDL_opengles2.h> | |
#endif | |
#include <stdlib.h> | |
#include "cglm/cglm.h" |
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
#ifdef __EMSCRIPTEN__ | |
#include <emscripten.h> | |
#include <SDL.h> | |
#include <SDL_opengles2.h> | |
#else | |
#include <SLD2/SDL.h> | |
#include <SDL2/SDL_opengles2.h> | |
#endif | |
#include <stdlib.h> | |
#include "cglm/cglm.h" |
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
//SDL2 and OpenGLES2 | |
//Run : emcc HelloTriangle.c -s USE_SDL=2 -s FULL_ES2=1 -s WASM=1 -o HelloTriangle.html | |
//Preview : emrun HelloTriangle.html | |
//This code is discussed here : https://ffmpeg.substack.com/p/running-sdl2-and-opengl-in-c-web | |
#ifdef __EMSCRIPTEN__ | |
#include <emscripten.h> | |
#include <SDL.h> | |
#include <SDL_opengles2.h> | |
#else |
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
#https://leetarxiv.substack.com/p/dual-ec-backdoor-coding-guide | |
from fastecdsa.curve import P256 | |
from fastecdsa.point import Point | |
from random import randint | |
class DualEC(): | |
def __init__(self, seed, P, Q): | |
self.seed = seed # Initial integer state of RNG | |
self.P = P # First elliptic curve point (public parameter) | |
self.Q = Q # Second elliptic curve point (could be maliciously chosen) |
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 <openssl/sha.h> | |
#include <openssl/rand.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <gmp.h> | |
#include <assert.h> | |
#include <math.h> | |
#include "ff_asm_primes.h" | |
#define STB_DS_IMPLEMENTATION |
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 <stdlib.h> | |
void PrintArray(int arrayLength, int *array) | |
{ | |
for(int i = 0; i < arrayLength; i++) | |
{ | |
printf("%3d, ", array[i]); | |
} | |
printf("\n"); |
NewerOlder