Skip to content

Instantly share code, notes, and snippets.

@sukunrt
sukunrt / sockopt.go
Created November 17, 2024 07:55
testing ipv6 dont fragment option
package main
import (
"net"
"time"
"golang.org/x/sys/unix"
)
func main() {
package main
import (
"context"
"fmt"
"time"
"github.com/libp2p/go-libp2p"
"github.com/libp2p/go-libp2p/core/peerstore"
"github.com/libp2p/go-libp2p/p2p/protocol/ping"

Cryptographic Best Practices

Putting cryptographic primitives together is a lot like putting a jigsaw puzzle together, where all the pieces are cut exactly the same way, but there is only one correct solution. Thankfully, there are some projects out there that are working hard to make sure developers are getting it right.

The following advice comes from years of research from leading security researchers, developers, and cryptographers. This Gist was [forked from Thomas Ptacek's Gist][1] to be more readable. Additions have been added from

@sukunrt
sukunrt / key_and_certificate_conversions.sh
Created March 8, 2023 20:37 — forked from salex89/key_and_certificate_conversions.sh
Different private/public key conversions GnuPG, OpenSSH and OpenSSL
# Source: http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL
# OpenSSH private keys are directly understable by OpenSSL. You can test for example:
openssl rsa -in ~/.ssh/id_rsa -text
openssl dsa -in ~/.ssh/id_dsa -text
# So, you can directly use it to create a certification request:
openssl req -new -key ~/.ssh/id_dsa -out myid.csr
# You can also use your ssh key to create a sef-signed certificate:
Nobel Prize
Like a beast in a pen, I'm cut off
From my friends, freedom, the sun,
But the hunters are gaining ground.
I've nowhere else to run.
Dark wood and the bank of a pond,
Trunk of a fallen tree.
There's no way forward, no way back.
It's all up with me.
@article{Freedman,
author = {Freedman, Michael J and Mazi, David},
file = {:Users/raul/Documents/Mendeley/coral-iptps03.pdf:pdf},
mendeley-groups = {Peer-to-peer networks},
title = {{Sloppy hashing and self-organizing clusters}}
}
@article{Baumgart2014,
author = {Baumgart, Ingmar and Mies, Sebastian},
doi = {10.1109/ICPADS.2007.4447808},
file = {:Users/raul/Documents/Mendeley/download.pdf:pdf},

Keybase proof

I hereby claim:

  • I am sukunrt on github.
  • I am sukunrt (https://keybase.io/sukunrt) on keybase.
  • I have a public key whose fingerprint is 3BA0 ECBD CC3B 3919 DA2B E69F 380C 81C5 D518 BC62

To claim this, I am signing this object: