Skip to content

Instantly share code, notes, and snippets.

@j-berman
j-berman / xmr_pedersen_simplified.py
Last active December 3, 2022 19:04
How pedersen commitments are constructed to hide amounts in Monero's RingCT (simplified)
# The goal with this program is to demonstrate how to construct pedersen
# commitments in similar fashion to how the Monero tx protocol does, but in a hugely
# simplified way (read: not exact, but close), to show how we can prove hidden input
# and output amounts balance.
# Some stuff is left as an exercise to the reader where commented.
# **Corrections are very much so welcome.**
# I encourage anyone who doesn't know much about pedersen commitments to
# go through coinstudent2048's excellent tutorial on elliptic curve
# cryptography [1] first. And anyone interested in this to first read through
# Zero to Monero v2 chapters 5 and 6 [3].
@guifromrio
guifromrio / nodejs-ubuntu-bind-port-80.md
Last active June 25, 2024 10:30
Allow Node.js to bind to privileged ports without root access on Ubuntu

How to: Allow Node to bind to port 80 without sudo

TL;DR

Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024

sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node

Important: your node location may vary. Use which node to find it, or use it directly in the command: