I hereby claim:
- I am martani on github.
- I am martani (https://keybase.io/martani) on keybase.
- I have a public key whose fingerprint is 44CE 0F6C 84E2 CA9C 0B0B 643E E05E 0DD5 E21E 38D5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
static List<string> SplitTextWithKeyLen(string text, int keyLen) | |
{ | |
List<string> result = new List<string>(); | |
StringBuilder[] sb = new StringBuilder[keyLen]; | |
for (int i = 0; i < keyLen; i++) | |
sb[i] = new StringBuilder(); | |
for (int i = 0; i < text.Length; i++) | |
sb[i % keyLen].Append(text[i]); |
static string DecipherVeginere(string text, string key) | |
{ | |
StringBuilder result = new StringBuilder(); | |
int keyLength = key.Length; | |
int diff; | |
char decoded; | |
for (int i = 0; i < text.Length; i++) | |
{ | |
diff = text[i] - key[i%keyLength]; |
$ ./time | |
Call to nsleep(970000) took 970149 | |
Call to usleep(970000) took 970143 | |
Call to sleep(1) took 1000154 | |
$ ./time | |
Call to nsleep(970000) took 970105 | |
Call to usleep(970000) took 970169 | |
Call to sleep(1) took 1000142 |
void gettimeofday_benchmark() | |
{ | |
int i; | |
struct timespec tv_start, tv_end; | |
struct timeval tv_tmp; | |
int count = 1 * 1000 * 1000 * 50; | |
clockid_t clockid; | |
int rv = clock_getcpuclockid(0, &clockid); |
let a = 14 | |
List.fold_left a i |
qdfsdf |
/* | |
* pollard-rho.c | |
* Created on: Dec 20, 2011 | |
* Author: martani | |
*/ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <gmp.h> |
$ ./pollard-rho 18446744073709551617 | |
Factoring 18446744073709551617 .. | |
Testing GCD: 274177 | |
Found divisor g = 274177 in 901 steps [0.004 s] | |
$ ./pollard-rho 10023859281455311421 | |
Factoring 10023859281455311421 .. | |
Testing GCD: 1308520867 | |
Found divisor g = 1308520867 in 25601 steps [0.037 s] |
<<intel i7>> | |
N = 676292275716558246502605230897191366469551764092181362779759 (60 digits | 199 bits) | |
Time = ~17 hours | |
<<intel i3>> | |
N = 139920333957092418127239064840267210440539 (42 digits | 137 bits) | |
Time = 66 minutes | |
<<intel i7>> | |
N = 5705979550618670446308578858542675373983 (40 digits | 133 bits) |