Skip to content

Instantly share code, notes, and snippets.

View EgosOwn's full-sized avatar
💼
software developer

Kevin F EgosOwn

💼
software developer
View GitHub Profile
@EgosOwn
EgosOwn / monero-account-combiner.py
Last active June 15, 2023 03:05
combine all monero accounts in a wallet to a single address (sweep all accounts)
# public domain/creative commons 0, use at your own risk
from typing import List
import traceback
from decimal import Decimal
# Please note that this script will have some amount of negative privacy impact.
from monero.wallet import Wallet
@EgosOwn
EgosOwn / mimc.js
Created April 23, 2023 21:44
mimc implementation in js
forward_mimc: (input_data, steps) => {
const encoder = new TextEncoder();
const decoder = new TextDecoder();
const inputBytes = encoder.encode(input_data);
let inp = BigInt('0x' + Array.from(inputBytes, byte => byte.toString(16).padStart(2, '0')).join(''));
for (let i = 1n; i < BigInt(steps); i++) {
inp = (inp ** 3n + _round_constants[Number(i % BigInt(_round_constants.length))]) % _modulus;
}