mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
a SRFI 60 installed which imports (scheme base). This can still break in theory if a user installs a third-party SRFI 33 in the search path in front of the Chibi SRFI 33, but we can't always be safe against such behavior. Fixes issue #267.
14 lines
512 B
Scheme
14 lines
512 B
Scheme
|
|
;;> RSA public key cryptography implementation.
|
|
|
|
(define-library (chibi crypto rsa)
|
|
(import (scheme base) (srfi 27)
|
|
(chibi bytevector) (chibi math prime))
|
|
(cond-expand
|
|
((library (srfi 33)) (import (srfi 33)))
|
|
(else (import (srfi 60))))
|
|
(export make-rsa-key rsa-key-gen rsa-key-gen-from-primes rsa-pub-key
|
|
rsa-encrypt rsa-decrypt rsa-sign rsa-verify rsa-verify?
|
|
rsa-key? rsa-key-bits rsa-key-n rsa-key-e rsa-key-d
|
|
pkcs1-pad pkcs1-unpad)
|
|
(include "rsa.scm"))
|