713-20 axf gruhi
Qalandarov Javlonbek
15-variant.
5-amaliy ish Mavzu: Elliptik egri chiziqlarda nuqtalarni n lashtirish imkonini beruvchi dasturiy vositani ishlab chiqish.
import java.util.Scanner;
public class kriptografiya { public static void main(String[] args) { Scanner scanner=new Scanner(System.in); System.out.println("Pni (x va y qiymatlarini kiriting)"); int x1= scanner.nextInt(); int y1=scanner.nextInt(); System.out.println("Qni (x va y qiymatlarini kiriting )"); int x2=scanner.nextInt(); int y2=scanner.nextInt();
while (true){ System.out.println("1=> bosangiz P+Qni hisoblab beradi ,2=>bosangiz 2Qni hisoblaydi "); switch (scanner.nextInt()){ case 1: int lambida=((y2-y1)/(x2-x1))%37; int xR=(lambida*lambida-x1-x2)%37; int yR=(lambida*(x1-xR)-y1)%37; int yRQ=(lambida*(x2-xR)-y2)%37; System.out.println("lambda ="+lambida); System.out.println("xR ="+xR); System.out.println("yR ="+yR); System.out.println("yRQ ="+yRQ); System.out.println("natija R=("+xR+","+yR+")"); break; case 2: int lam=((3*(x1*x1)+2)/2*y1)%37; int XR=(lam*lam-2*x1)%37; int XY=(lam*(x1-XR)-y1)%37; System.out.println("D="+XR+","+XY); break; }
} } }
Nazorat savollari
1. Elliptik egri chiziqlar tushunchasi. Elleptik egri chiziqlar ochiq kalitli kriptotizimlar oilasining aʼzosi hisoblanadi. Kam sonli hisoblashlar asosida RSA va Diskret logarifm sxemalarining bardoshliligini taʼminlaydi (mos holda 160-256 va 1024-3072 bit kalit uzunligi). Elliptik egri chiziqlar takomillashgan Diskret logarifm muammosiga asoslangan
Do'stlaringiz bilan baham: |