This document proposes a new scheme to avoid address reuse while retaining some of the convenience of address reuse, keeping recoverability purely from Bitcoin time chain and avoiding visible fingerprint. The scheme has negligible average overhead.
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
use std::alloc::{alloc, dealloc, Layout}; | |
//use std::fmt::Pointer; | |
fn main() { | |
// Number of elements to allocate | |
const NUM_ELEMENTS: usize = 100; | |
// Size of each element in bytes | |
const ELEMENT_SIZE: usize = 4; // Assuming 4 bytes per element (e.g., 32-bit integer) | |
// Calculate total size in bytes |
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
use std::alloc::{alloc, dealloc, Layout}; | |
//use std::fmt::Pointer; | |
fn main() -> () { | |
// Number of elements to allocate | |
const NUM_ELEMENTS: usize = 100; | |
// Size of each element in bytes | |
const ELEMENT_SIZE: usize = 8; // Assuming 4 bytes per element (e.g., 32-bit integer) | |
// Calculate total size in bytes |
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
use std::alloc::{alloc, dealloc, Layout}; | |
//use std::fmt::Pointer; | |
fn main() -> () { | |
// Number of elements to allocate | |
const NUM_ELEMENTS: usize = 100; | |
// Size of each element in bytes | |
const ELEMENT_SIZE: usize = 64; // Assuming 4 bytes per element (e.g., 32-bit integer) | |
// Calculate total size in bytes |
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
use std::alloc::{alloc, dealloc, Layout}; | |
//use std::fmt::Pointer; | |
fn main() -> () { | |
// Number of elements to allocate | |
const NUM_ELEMENTS: usize = 100; | |
// Size of each element in bytes | |
const ELEMENT_SIZE: usize = 1024; // Assuming 4 bytes per element (e.g., 32-bit integer) | |
// Calculate total size in bytes |
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
use std::alloc::{alloc, dealloc, Layout}; | |
//use std::fmt::Pointer; | |
fn main() -> () { | |
// Number of elements to allocate | |
const NUM_ELEMENTS: usize = 1024; | |
// Size of each element in bytes | |
const ELEMENT_SIZE: usize = 64; // Assuming 4 bytes per element (e.g., 32-bit integer) | |
// Calculate total size in bytes |
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
fn main() { | |
let num1 = vec![2, 3]; | |
let num2 = vec![2, 3]; | |
let address1 = &num1 as *const Vec<i32>; | |
let address2 = &num2 as *const Vec<i32>; | |
let number1 = address1 as i32; | |
let number2 = address2 as i32; | |
println!("{}", number1 % 13); | |
println!("{}", number2 % 13); |
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
use std::fmt; | |
use std::net::{TcpStream, SocketAddr, ToSocketAddrs}; | |
use std::io::prelude::*; | |
use std::collections::*; | |
#[derive(Debug)] | |
pub enum Method { | |
GET, | |
POST, | |
PUT, |
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
use std::thread; | |
const NTHREADS: u32 = 10; | |
// This is the `main` thread | |
fn main() { | |
// Make a vector to hold the children which are spawned. | |
let mut children = vec![]; | |
for i in 0..NTHREADS { |
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
use std::sync::mpsc::{Sender, Receiver}; | |
use std::sync::mpsc; | |
use std::thread; | |
static NTHREADS: i32 = 3; | |
fn main() { | |
// Channels have two endpoints: the `Sender<T>` and the `Receiver<T>`, | |
// where `T` is the type of the message to be transferred | |
// (type annotation is superfluous) |