Home
Language
English
TΓΌrkΓ§e
Bahasa Indonesia
About
Privacy Policy
Terms of Service
Pricing
Sign In
Download All
Share
TweetNaCl
@TweetNaCl
NaCl in 100 tweets, auditable, available crypto library
Compatible with:
Joined July 2013
0
Following
295
Followers
100
Posts
TweetNaCl
@TweetNaCl
about 12 years ago
(p,q);pack(t,p);n-=64;if(crypto_verify_32(sm,t)){FOR(i,n)m[i]=0;return-1;}FOR(i,n)m[i]=sm[i+64];*mlen=n;return 0;}
TweetNaCl
@TweetNaCl
about 12 years ago
if(unpackneg(q,pk))return-1;FOR(i,n)m[i]=sm[i];FOR(i,32)m[i+32]=pk[i];crypto_hash(h,m,n);reduce(h);scalarmult(p,q,h);scalarbase(q,sm+32);add
TweetNaCl
@TweetNaCl
about 12 years ago
);return 0;}int crypto_sign_open(u8*m,u64*mlen,const u8*sm,u64 n,const u8*pk){int i;u8 t[32],h[64];gf p[4],q[4];*mlen= -1;if(n<64)return-1;
TweetNaCl
@TweetNaCl
about 12 years ago
num))M(r[0],r[0],I);S(chk,r[0]);M(chk,chk,den);if(neq25519(chk,num))return-1;if(par25519(r[0])==(p[31]>>7))Z(r[0],gf0,r[0]);M(r[3],r[0],r[1]
Who to follow
Daniel J. Bernstein
@hashbreaker
Designing cryptography (deployed now: X25519, Ed25519, ChaCha20, sntrup, Classic McEliece) to proactively reduce risks. Coined phrase "post-quantum" in 2003.
Brad Spengler
@spendergrsec
President of @opensrcsec, developer of @grsecurity Personal account
Ivan Fratric ππ
@ifsecure
Tech lead and security researcher at Google Project Zero. Author: Jackalope, TinyInst, WinAFL, Domato. PhD. Tweets are my own. Backup @
[email protected]
TweetNaCl
@TweetNaCl
about 12 years ago
den4,den2);M(t,den6,num);M(t,t,den);pow2523(t,t);M(t,t,num);M(t,t,den);M(t,t,den);M(r[0],t,den);S(chk,r[0]);M(chk,chk,den);if(neq25519(chk,
TweetNaCl
@TweetNaCl
about 12 years ago
,den4,den6;set25519(r[2],gf1);unpack25519(r[1],p);S(num,r[1]);M(den,num,D);Z(num,num,r[2]);A(den,r[2],den);S(den2,den);S(den4,den2);M(den6,
TweetNaCl
@TweetNaCl
about 12 years ago
u64)r[i];FOR(i,32)FOR(j,32)x[i+j]+=h[i]*(u64)d[j];modL(sm+32,x);return 0;}static int unpackneg(gf r[4],const u8 p[32]){gf t,chk,num,den,den2
TweetNaCl
@TweetNaCl
about 12 years ago
+32,n+32);reduce(r);scalarbase(p,r);pack(sm,p);FOR(i,32)sm[i+32]=sk[i+32];crypto_hash(h,sm,n+64);reduce(h);FOR(i,64)x[i]=0;FOR(i,32)x[i]=(
TweetNaCl
@TweetNaCl
about 12 years ago
64];gf p[4];crypto_hash(d,sk,32);d[0]&=248;d[31]&=127;d[31]|=64;*smlen=n+64;FOR(i,n)sm[64+i]=m[i];FOR(i,32)sm[32+i]=d[32+i];crypto_hash(r,sm
TweetNaCl
@TweetNaCl
about 12 years ago
,64)x[i]=(u64)r[i];FOR(i,64)r[i]=0;modL(r,x);}int crypto_sign(u8*sm,u64*smlen,const u8*m,u64 n,const u8*sk){u8 d[64],h[64],r[64];i64 i,j,x[
TweetNaCl
@TweetNaCl
about 12 years ago
[31]>>4)*L[j];carry=x[j]>>8;x[j]&=255;}FOR(j,32)x[j]-=carry*L[j];FOR(i,32){x[i+1]+=x[i]>>8;r[i]=x[i]&255;}}sv reduce(u8*r){i64 x[64],i;FOR(i
TweetNaCl
@TweetNaCl
about 12 years ago
(j=i-32;j<i-12;++j){x[j]+=carry-16*x[i]*L[j-(i-32)];carry=(x[j]+128)>>8;x[j]-=carry<<8;}x[j]+=carry;x[i]=0;}carry=0;FOR(j,32){x[j]+=carry-(x
TweetNaCl
@TweetNaCl
about 12 years ago
0x9c,0xf7,0xa2,0xde,0xf9,0xde,0x14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0x10};sv modL(u8*r,i64 x[64]){i64 carry,i,j;for(i=63;i>=32;--i){carry=0;for
TweetNaCl
@TweetNaCl
about 12 years ago
d[31]|=64;scalarbase(p,d);pack(pk,p);FOR(i,32)sk[32+i]=pk[i];return 0;}static const u64 L[32]={0xed,0xd3,0xf5,0x5c,0x1a,0x63,0x12,0x58,0xd6,
TweetNaCl
@TweetNaCl
about 12 years ago
scalarmult(p,q,s);}int crypto_sign_keypair(u8*pk,u8*sk){u8 d[64];gf p[4];int i;randombytes(sk,32);crypto_hash(d,sk,32);d[0]&=248;d[31]&=127;
TweetNaCl
@TweetNaCl
about 12 years ago
;add(p,p);cswap(p,q,b);}}sv scalarbase(gf p[4],const u8*s){gf q[4];set25519(q[0],X);set25519(q[1],Y);set25519(q[2],gf1);M(q[3],X,Y);
TweetNaCl
@TweetNaCl
about 12 years ago
set25519(p[0],gf0);set25519(p[1],gf1);set25519(p[2],gf1);set25519(p[3],gf0);for(i=255;i>=0;--i){u8 b=(s[i/8]>>(i&7))&1;cswap(p,q,b);add(q,p)
TweetNaCl
@TweetNaCl
about 12 years ago
inv25519(zi,p[2]);M(tx,p[0],zi);M(ty,p[1],zi);pack25519(r,ty);r[31]^=par25519(tx)<<7;}sv scalarmult(gf p[4],gf q[4],const u8*s){int i;
TweetNaCl
@TweetNaCl
about 12 years ago
p[1],h,g);M(p[2],g,f);M(p[3],e,h);}sv cswap(gf p[4],gf q[4],u8 b){int i;FOR(i,4)sel25519(p[i],q[i],b);}sv pack(u8*r,gf p[4]){gf tx,ty,zi;
TweetNaCl
@TweetNaCl
about 12 years ago
);A(b,p[0],p[1]);A(t,q[0],q[1]);M(b,b,t);M(c,p[3],q[3]);M(c,c,D2);M(d,p[2],q[2]);A(d,d,d);Z(e,b,a);Z(f,d,c);A(g,d,c);A(h,b,a);M(p[0],e,f);M(
Last Seen Users on Sotwe
Naz
Seen from
Turkey
Jav Model
Seen from
Poland
π§βπΎ@edgefunmanager (top 1% of punny handles π)
Seen from
Korea
MAMAK STW
Seen from
Singapore
οΌ οΌ΄ο½ο½ο½ο½οΌ§ο½ο½ e s s 6 9
Seen from
Turkey
γ¨γ¬γ
Seen from
Japan
/sou
Seen from
Algeria
ΰΈΰΈ²ΰΈ’ΰΈΰΈ§ΰΈ’ΰΉΰΈΰΉΰΈ
Seen from
Thailand
finansal kΓΆleeee
Seen from
Turkey
Kazibe
Seen from
Turkey
Trends for you
1
Good Friday
Under 10K tweets
2
Maine
Under 10K tweets
3
#NationalDonutDay
Under 10K tweets
4
Collins
Under 10K tweets
5
#TheLiesOfIsrael
Under 10K tweets
6
#LaSayoPidiendoCacao
Under 10K tweets
7
RED Friday
Under 10K tweets
8
#FursuitFriday
Under 10K tweets
9
Happy Friyay
Under 10K tweets
10
Muncy
Under 10K tweets
Most Popular Users
1
Elon Musk
@elonmusk
240.1M followers
2
Barack Obama
@barackobama
119.3M followers
3
Donald J. Trump
@realdonaldtrump
111.6M followers
4
Cristiano Ronaldo
@cristiano
108.9M followers
5
Narendra Modi
@narendramodi
107M followers
6
Rihanna
@rihanna
97.3M followers
7
NASA
@nasa
92.1M followers
8
Justin Bieber
@justinbieber
90.6M followers
9
KATY PERRY
@katyperry
86.8M followers
10
Taylor Swift
@taylorswift13
80.6M followers
11
Lady Gaga
@ladygaga
72.1M followers
12
Kim Kardashian
@kimkardashian
69.4M followers
13
YouTube
@youtube
68.6M followers
14
Virat Kohli
@imvkohli
68.5M followers
15
Bill Gates
@billgates
63.4M followers
16
The Ellen Show
@theellenshow
62.5M followers
17
CNN
@cnn
61.9M followers
18
Neymar Jr
@neymarjr
61M followers
19
X
@x
60.9M followers
20
CNN Breaking News
@cnnbrk
59.9M followers
Olivia
Online
β¨
β
π«