Jump to content

SlicK

Active Members
  • Posts

    350
  • Joined

  • Last visited

  • Days Won

    5

SlicK last won the day on March 10 2011

SlicK had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

SlicK's Achievements

Newbie

Newbie (1/14)

29

Reputation

  1. MultInv vine de la "multiplicative inverse" si e necesar pentru ca d=e-1 mod phi sau alfel spus d e "multiplicative inverse" pentru e mod phi. Primul cod trebuie sa compileze fara probleme in Visual Studio 2008. Unele caractere sunt neinteligibile pentru ca sunt intre 0x00 si 0xFF adica in afara ASCII-ului printabil.
  2. RSA pe 16 biti, daca vrei mai mult trebuie sa folosesti clase de numere mari. #include <windows.h> #include <stdio.h> #include <math.h> #include <time.h> bool IsPrime(int nr) { for(int i=2;i<nr-1;i++) { if(nr%i==0) { return(false); } } return(true); } int RandPrime(int min, int max) { int nr=rand()%(max-min+1)+min; while(!IsPrime(nr)) { nr++; } return(nr); } int GCD(int nr1, int nr2) { do { int tmp=nr1%nr2; nr1=nr2; nr2=tmp; } while(nr2!=0); return(nr1); } int MultInv(int a,int m) { a=a%m; for(int i=1;i<m;i++) { if(a*i%m==1) { return(i); } } return(0); } int modpow(int b, int e, int m) { int ret=1; while(e>0) { if((e&1)==1) { ret=(ret*%m; } e=e>>1; b=(b*%m; } return(ret); } void GenKeys(int& n,int& e,int& d) { int p=RandPrime(0x43,0x7F); int q=RandPrime(0x43,0x7F); if(p==q) { return(GenKeys(n,e,d)); } n=p*q; e=3; int phi=(p-1)*(q-1); if(GCD(e,phi)!=1) { return(GenKeys(n,e,d)); } d=MultInv(e,phi); if(d==0) { return(GenKeys(n,e,d)); } } void Encrypt(int n,int e,char* src,int srclen,unsigned char* dst,int& dstlen) { for(int i=0;i<srclen;i++) { int c=modpow(src[i],e,n); dst[i*2] =(c>>8)&0xFF; dst[i*2+1]=c&0xFF; } dstlen=srclen*2; } void Decrypt(int n,int e,unsigned char* src,int srclen,unsigned char* dst,int& dstlen) { for(int i=0;i<srclen;i+=2) { int x=(src[i]<<8)|src[i+1]; dst[i/2]=(unsigned char)modpow(x,e,n); } dstlen=srclen/2; } int main() { srand((int)time(0)); int n,e,d; GenKeys(n,e,d); printf("n=%X\n",n); printf("e=%X\n",e); printf("d=%X\n",d); char plain[]="Hello RSA"; printf("%s\n",plain); unsigned char encr[256]=""; int elen; Encrypt(n,e,plain,strlen(plain),encr,elen); for(int i=0;i<elen;i++) { printf("%c",(UCHAR)encr[i]); } printf("\n"); unsigned char decr[256]=""; int dlen; Decrypt(n,d,encr,elen,decr,dlen); for(int i=0;i<dlen;i++) { printf("%c",decr[i]); } printf("\n"); getchar(); return(0); } Poti sa pastrezi invitatia
  3. De ce sa fie cerc si nu un oval? sau un triunghi? Prin definitie "axa numerelor" are o singura dimensiune, adica alegand un punct oarecare ca punct de reper(sa-i spunem 0) de pe axa(X) un punct(numar) poate sa fie doar la distanta A (valoarea) fata de 0. Axa asta nu poate avea alta forma decat dreapta pentru ca in momentul in care ai curbat-o ai adaugat o noua dimensiune deci orice punct va fi definit prin minim 2 distante(A si pe 2 axe(X si Y) la fel de drepte si care se intersecteaza intr-un punct numit origine(00). In momentul in care ai curbat axa atunci fostele puncte -infinit si + infinit aflate intr-un spatiu unidimensional au devenit 2 puncte intr-un spatiu bidimensional definite prin 2 seturi de coordonate diferite. Ce vrei tu sa demonstrezi de fapt este ca un cerc are o singura dimensiune sau ca orice obiect cu n dimensiuni are de fapt n-1 dimensiuni. Coordinate system - Wikipedia, the free encyclopedia
  4. Da, au facut modificari si programul nu mai functioneaza(cel putin la unele din seriale)...
  5. Asa si trebuie, mai multe detalii? Ai procesor pe 64 de biti? Invalid si mai ce? trimite-mi PM cu un printscreen.
  6. Incearca asta, posibil sa nu ai runtimeul http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-4391-8a4d-074b9f2bc1bf&displaylang=en
  7. Acum merg si subtitrarile http://rstcenter.com/forum/25068-rst-vplay-ro-treci-peste-timpul-de-asteptare.rst#post168045
  8. Mersi La subtitrare nu prea am ce sa-i fac deocamdata pentru ca e un feature al playerului lor.
  9. Cu aplicatia asta se poate trece peste cele 30 de minute de asteptare de la Vplay.ro si de asemenea downloada videoclipurile in format mp4. Campul "Vplay link" primeste un link de forma hxxp://www.vplay.ro/watch/XXXXXXXX/ iar butonul "Open" deschide un player localhost care afiseaza videoclipul. EDIT: Updatat la 2.0 -Afiseaza subtitrarea -Suporta si link de forma hxxp://www.vplay.ro/waiting/XXXXXXXX/ DOWNLOAD: http://www.fileshare.ro/9279374565.12 http://www.mediafire.com/?h2w8no7v7y8tvwj http://www.easy-share.com/1911918606/Vplay0Wait.zip http://rapidshare.com/files/413643911/fileshare.ro_Vplay0Wait.zip http://www.speedyshare.com/files/23852903/fileshare.ro_Vplay0Wait.zip http://www.mediafire.com/?uichk5b89hc65tt
  10. Tehnologia asta e disponibila de cateva decenii. Tipul asta de program foloseste Algoritmi Genetici si Retele Neurale doar ca poate ei fac lucrurile la un nivel mai inalt avand mai multa putere de calcul. Genetic algorithm - Wikipedia, the free encyclopedia Neural network - Wikipedia, the free encyclopedia
  11. Programul permite selectarea serverului cu care se termina o conexiune TOR in esenta pemitand selectarea ip'ului din TOR. Ca aplicatia sa se poata conecta, TOR trebuie configurat sa permita autentificare fara parola Executabil http://www.fileshare.ro/8237785395.92 Tut video http://www.fileshare.ro/8220338064.72 Edit: Updatat la 1.1 (fixat un bug la reload)
  12. Disonanta Cognitiva
  13. Da, ramane injectat doar cat timp ruleaza procesul tinta.
  14. #include <stdio.h> #define A + #define AA - #define BB 1 #define AAA int #define AAAA main #define AAAAA ( #define AAAAAA ) #define AAAAAAA { #define AAAAAAAA putchar #define AAAAAAAAA , #define AAAAAAAAAA ; #define AAAAAAAAAAA } #define AAAAAAAAAAAA " #define AAAAAAAAAAAAA * #define AAAAAAAAAAAAAA / #define H AAA AAAA AAAAA #define B(AAAAAAAAAAAAAAA) AAAAAAAA AAAAA AAAAAAAAAAAAAAA AAAAAA AAAAAAAAAA #define BBB AAAAA BB A BB A BB A BB A BB A BB A BB A BB A BB A BB AAAAAA #define e AAAAAA AAAAAAA B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA) B(BBBB) #define l B(BBBB A AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AAAAAAAAAAAAAA BBB) #define T B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB A BB A BB) AAAAAAAAAAA #define o B(BBBB A AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AAAAAAAAAAAAAA BBB A BB A BB A BB) #define R B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA AA BBB AAAAAAAAAAAAA AAAAA BB A BB A BB A BB AAAAAA) #define BBBB AAAAA AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A AAAAA BBB AAAAAAAAAAAAA AAAAA BB A BB A BB AAAAAA AA BB AAAAAA AAAAAA #define S B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB) B(AAAAA AAAAA BBB AA BB AA BB AA BB AAAAAA AAAAAAAAAAAAA BBB A BB A BB AAAAAA A BBB A BB) H e l l o R S T
  15. ha, s-a aflat ar fi fost amuzant sa puna textul asta in loc de hash
×
×
  • Create New...