anchor.diff:           (a (ed25519-decode-point pk))
            (h (ed25519-decode-int (ed25519-hash (ed25519-encode-point r) pk m)))
            (res1 (ed25519-scalar-mult +ed25519-b+ s))
  -         (res2 (ed25519-edwards r (ed25519-scalar-mult a h))))
  +         (res2 (ed25519-edwards-add r (ed25519-scalar-mult a h))))
       (equal res1 res2)))
   
   (defmethod make-public-key ((kind (eql :ed25519)) &key y &allow-other-keys)
  
positive.code:       (setf x (- +ed25519-q+ x)))
      x))
  
  (defun ed25519-edwards (p q)
    (declare (optimize (speed 3) (safety 0) (space 0) (debug 0)))
    (let* ((x1 (car p))
           (y1 (cdr p))
  
negative.code:          (x2y1 (mod (* x2 y1) +ed25519-q+))
           (y1y2 (mod (* y1 y2) +ed25519-q+))
           (dx1x2y1y2 (mod (* +ed25519-d+ x1x2 y1y2) +ed25519-q+))
           (x3 (* (+ x1y2 x2y1) (ed25519-inv (+ 1 dx1x2y1y2))))
           (y3 (* (+ y1y2 x1x2) (ed25519-inv (- 1 dx1x2y1y2)))))
      (cons (mod x3 +ed25519-q+) (mod y3 +ed25519-q+))))
  
  (defun ed25519-scalar-mult (point e)
    "Point multiplication using the windowed method."
    (declare (optimize (speed 3) (safety 0) (space 0) (debug 0)))
    (let* ((result (cons 0 1))
           (k 5)
           (base (expt 2 k))
  
           ;; Compute the digits of the exponent in base 2^k
           (digits (do ((q e)
                        r
                        digits)
                       ((zerop q) digits)
                     (multiple-value-setq (q r) (floor q base))
                     (push r digits)))
           (multiples (make-array base :initial-element (cons 0 1))))
  
      ;; Precompute the multiples of point
      (dotimes (i (1- base))
        (setf (aref multiples (1+ i)) (ed25519-edwards-add (aref multiples i) point)))
  
      ;; Compute the result
      (dolist (digit digits result)
        (dotimes (i k)
          (setf result (ed25519-edwards-double result)))
        (unless (zerop digit)
          (setf result (ed25519-edwards-add result (aref multiples digit)))))))
  
  (defun ed25519-on-curve-p (p)
    (declare (optimize (speed 3) (safety 0) (space 0) (debug 0)))
  