Skip to content

Commit

Permalink
Make prototype run again
Browse files Browse the repository at this point in the history
  • Loading branch information
sander committed Jan 4, 2025
1 parent 5b00b44 commit fe81753
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions prototype.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
(if (null bf) (fold salt (cdr path) bf-prime)
(fold salt (cdr path)
(BL-Combine-Blinding-Factors bf bf-prime)))))
(t (multiple-value-bind (pk sk) (KEM-Derive-Key-Pair salt)
(t (multiple-value-bind (sk pk) (KEM-Derive-Key-Pair salt)
(declare (ignore pk))
(fold (KEM-Decap (car path) sk) (cdr path) bf)))))

Expand All @@ -155,7 +155,7 @@
(defun delegate-key-creation (app hdk)
(KEM-Derive-Key-Pair (nth-value 1 (fold (seed app) hdk))))
(defun accept-key (app hdk kh index pk-expected)
(multiple-value-bind (pk sk) (delegate-key-creation app hdk)
(multiple-value-bind (sk pk) (delegate-key-creation app hdk)
(declare (ignore pk))
(let ((salt (KEM-Decap kh sk))
(pk-bl (get-key-info app hdk)))
Expand All @@ -178,7 +178,7 @@
(defun prove-possession (unit doc reader-data)
(create-shared-secret (app unit) (unit-hdk unit doc) reader-data))
(defun request (unit doc-parent)
(delegate-key-creation (app unit) (unit-hdk unit doc-parent)))
(nth-value 1 (delegate-key-creation (app unit) (unit-hdk unit doc-parent))))
(defun accept (unit doc-parent kh index doc)
(let* ((hdk (unit-hdk unit doc-parent))
(app (app unit)))
Expand Down Expand Up @@ -232,7 +232,7 @@

(let* ((app (make-app))
(pk-bl (get-key-info app +hdk-root+))
(pk-kem (delegate-key-creation app +hdk-root+)))
(pk-kem (nth-value 1 (delegate-key-creation app +hdk-root+))))
(multiple-value-bind (salt kh) (KEM-Encap pk-kem)
(let ((pk-expected (BL-Blind-Public-Key pk-bl (HDK salt 0))))
(accept-key app +hdk-root+ kh 0 pk-expected))))
Expand Down

0 comments on commit fe81753

Please sign in to comment.