You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$G$는 이미 알려져있고, $Q$는 Public Key 생성 후 공개되지만, 이 두 값으로 $d$를 유추해 내기 굉장히 어렵다(ECDLP,Elliptic Curve Discrete Logarithm Problem).
398
411
직접 대입 방식 말고는 아직까지 해답이 없다.
399
412
400
-
> $Qa=dA*G=3*[4,5]=[13,22]$
413
+
$Qa=dA*G=3*[4,5]=[13,22]$
401
414
402
415
## (3) Sign
403
416
- 파일의 해시(파일 고유 번호)와 함께 개인키를 방정식에 넣으면 서명됨
404
417
- 서명은 각각 20바이트의 $r$과 $s$ 두값으로 나뉨 $(r,s)$
418
+
405
419
### $r$
406
420
1. 먼저 임의의 값인 '$k$(20 bytes)'를 생성하고 점의 곱셈을 사용하여 $P=k\times G$를 계산한다.
407
421
2. 점 $P$의 $x$값이 '$r$'을 나타낸다(20 bytes).
422
+
408
423
### $s$
409
424
1. $s$를 계산하려면 메시지의 SHA1 해시를 만들어야한다. 이 값은 매우 큰 정수로 간주되는 20 bytes 값을 제공하며 '$z$'라고 한다.
410
425
2. 다음 등식을 사용하여 $s$ 를 계산할 수 있다.
426
+
411
427
$$s=k^{-1}(z+dA\times r)\ mod\ P$$
412
428
413
429
## (4) 검증
@@ -420,6 +436,7 @@ $$P=s^{-1}\times z \times G+s^{-1}\times r \times Qa$$
420
436
421
437
### 검증식 증명
422
438
검증식이 서명식으로 전개되는 것을 증명한다.
439
+
423
440
$P=s^{-1}\times z \times G+s^{-1}\times r \times Qa$
424
441
$(Qa=dA\times G)$
425
442
$P=s^{-1}\times z \times G+s^{-1}\times r \times dA\times G$
@@ -429,14 +446,17 @@ $s=k^{-1}(z+dA\times r)$
429
446
430
447
### (5) Public Key Recover (Ethereum)
431
448
For $j$ from $0$ to $h$ do the following.
449
+
432
450
1. Let $x = r + jn$.
433
451
2. Convert the integer $x$ to an octet string $X$ of length $mlen$ using the conversion routine specified in Section 2.3.7, where $mlen = \lceil(log_{2} p)/8e\rceil$ or $mlen = \lceil m/8e\rceil$.
434
452
3. Convert the octet string 0216kX to an elliptic curve point R using the conversion routine specified in Section 2.3.4. If this conversion routine outputs “invalid”, then do another iteration of Step 1.
435
453
4. If $nR \ne O$, then do another iteration of Step 1.
436
454
5. Compute e from M using Steps 2 and 3 of ECDSA signature verification.
437
455
6. For k from 1 to 2 do the following.
438
456
1. Compute a candidate public key as:
457
+
439
458
$$Q=r^{-1}(sR-eG)$$
459
+
440
460
2. Verify that $Q$ is the authentic public key. (For example, verify the signature of a certification authority in a certificate which has been truncated by the omission of $Q$ from the certificate.) If $Q$ is authenticated, stop and output $Q$.
0 commit comments