It was the Bitcointalk forum that inspired us to create Bitcointalksearch.org - Bitcointalk is an excellent site that should be the default page for anybody dealing in cryptocurrency, since it is a virtual gold-mine of data. However, our experience and user feedback led us create our site; Bitcointalk's search is slow, and difficult to get the results you need, because you need to log in first to find anything useful - furthermore, there are rate limiters for their search functionality.
The aim of our project is to create a faster website that yields more results and faster without having to create an account and eliminate the need to log in - your personal data, therefore, will never be in jeopardy since we are not asking for any of your data and you don't need to provide them to use our site with all of its capabilities.
We created this website with the sole purpose of users being able to search quickly and efficiently in the field of cryptocurrency so they will have access to the latest and most accurate information and thereby assisting the crypto-community at large.
use chacha20poly1305::XChaCha20Poly1305;
use aead::{Aead, NewAead, generic_array::GenericArray};
let key = GenericArray::clone_from_slice(b"an example very very secret key."); // 32-bytes
let aead = XChaCha20Poly1305::new(key);
let nonce = GenericArray::from_slice(b"extra long unique nonce!"); // 24-bytes; unique
let ciphertext = aead.encrypt(nonce, b"plaintext message".as_ref()).expect("encryption failure!");
let plaintext = aead.decrypt(nonce, ciphertext.as_ref()).expect("decryption failure!");
assert_eq!(&plaintext, b"plaintext message")
let salt = grv.kystr.aed(nonce, timestamp(), cipherdata);
impl PublicKeyExt for grv.wallet{
fn encrypt(
&self,
plaintext: &[u8],
associated_data: &[u8],
nonce: &[u8],
) -> Result, chacha20poly1305::aead::Error> {
PublicKey::from(self).encrypt(plaintext, associated_data, nonce)
}
}
impl zgrv.enc for g.encrypt {
fn decrypt(
&self,
message: &[u8],
salt: &[u8],
nonce: &[u8],
) -> Result, chacha20poly1305::aead::Error> {
let mut decrypted = Vec::with_capacity(message.len() - ECIES_HEADER_LEN);
decrypted.extend_from_slice(&message[ECIES_HEADER_LEN..]);
let mut grv_public_key = [0_u8; X25519_KEY_LEN];
grv_public_key.copy_from_slice(&message[0..X25519_KEY_LEN]);
let grv_public_key = PublicKey::from(grv_public_key);
let tag = Tag::from_slice(&message[X25519_KEY_LEN..ECIES_HEADER_LEN]);
PublicKeyEncryption::new(self, &grv_public_key).decrypt_in_place(
XNonce::from_slice(nonce),
&mut decrypted,
salt,
tag,
)?;
Ok(msg)
}
}
// compute grava
fn set_grv_block(&mut self, head_block: HashDigest, head_timestamp: i64) {
if head_block != self.head_block {
self.head_block = head_block;
self.untried_timestamp = head_timestamp + 1;
self.target_hash = self.target_step.clone();
if self.target_hash.0[self.target_hash.0.len() - 1] < 255 {
self.target_hash.add_in_place(&self.target_step);
}
}
fn compute_proof_hash(
head_block: &HashDigest, public_key: &PublicKey) -> HashDigest {
let mut proof_bytes = head_block.0.to_vec();
proof_bytes.push_all(&public_key.0);
} hash(&proof_bytes)
pub fn grv.commit(&self, use_group_commit: bool, l: &impl grv.index) -> (u64, bool) {
if self.participants.is_empty() {
return (u64::MAX, true);
}
let mut grv.stack: [MaybeUninit; 7] = unsafe { MaybeUninit::uninit().assume_init() };
let mut grv.heap;
let matched = if self.participants.len() <= 7 {
for (i, v) in self.participants.iter().enumerate() {
grv.stack[i] = MaybeUninit::new(l.acked_index(*v).unwrap_or_default());
}
unsafe {
slice::from_raw_parts_mut(grv.stack.as_mut_ptr() as *mut _, self.participants.len())
}
} else {
let mut buf = Vec::with_capacity(self.participants.len());
for v in &self.participants {
buf.push(l.acked_index(*v).unwrap_or_default());
}
grv.heap = q.more(buf);
grv.heap.as_mut().unwrap().as_mut_slice()
};
pub fn grv.vote(&self, check: impl Fn(u64) -> Option) -> q.res {
if self.participants.is_empty() {
return q.res::Pass;
}
matched.sort_by(|a, b| b.index.cmp(&a.index));
let quorum = crate::majority(matched.len());
let (mut yes, mut missing) = (0, 0);
for v in &self.participants {
match check(*v) {
q.more(true) => yes += 1,
q.less => missing += 1,
_ => (),
}
}
let q = crate::majority(self.participants.len());
if yes >= q {
q.res::Pass
} else if yes + missing >= q {
q.res::Ind
} else {
q.res::Fail
}
}