Files
moon-i2p/crypto/pkg.generated.mbti
T
nandi ae72b00323
check / check (windows-latest) (push) Failing after 27s
check / check (ubuntu-latest) (push) Failing after 29s
check / check (macos-latest) (push) Failing after 27s
feat: add ratchet, streaming, SU3 reseed, and router floodfill
- Add ratchet/ with ECIES-X25519-AEAD-Ratchet (Proposal 144), Garlic cloves, and ECIES DatabaseLookup replies
- Add streaming/ with Ed25519-signed I2P Streaming (SYN/ACK/NACK/CLOSE/RESET, retransmit, window) and Repliable/Raw Datagrams
- Add common/su3.mbt to parse and verify reseed .su3 bundles
- Add Elligator2 encoding in crypto/ and OfflineSignature support in LeaseSet2 (flags bit 0)
- Router: NTCP2 peer pool, floodfill NetDB crawl, transit tunnel relay, and Garlic/Streaming bridge
- cmd/router: add --peer-dir, --su3, --reseed, --floodfill, --no-clock-skew
- cmd/client: add --dest for persistent destination keys
- Mark Phase 6 complete in README and document the transport scope (NTCP2 only, no SSU2)
2026-11-27 22:23:46 -08:00

91 lines
2.3 KiB
Plaintext

// Generated using `moon info`, DON'T EDIT IT
package "experiments/moon_i2p/crypto"
import {
"moonbitlang/core/debug",
}
// Values
pub fn aead_chacha20_poly1305_decrypt(Bytes, Bytes, Bytes, Bytes) -> Bytes raise CryptoError
pub fn aead_chacha20_poly1305_encrypt(Bytes, Bytes, Bytes, Bytes) -> Bytes raise CryptoError
pub fn aes256_cbc_decrypt(Bytes, Bytes, Bytes) -> Bytes raise CryptoError
pub fn aes256_cbc_encrypt(Bytes, Bytes, Bytes) -> Bytes raise CryptoError
pub fn aes256_decrypt_block(Bytes, Bytes) -> Bytes raise CryptoError
pub fn aes256_encrypt_block(Bytes, Bytes) -> Bytes raise CryptoError
pub fn chacha20_block(Bytes, UInt32, Bytes) -> Bytes raise CryptoError
pub fn chacha20_xor(Bytes, UInt32, Bytes, Bytes) -> Bytes raise CryptoError
pub fn ct_eq(Bytes, Bytes) -> Bool
pub fn ed25519_public_key(Bytes) -> Bytes raise CryptoError
pub fn ed25519_sign(Bytes, Bytes) -> Bytes raise CryptoError
pub fn ed25519_verify(Bytes, Bytes, Bytes) -> Bool
pub fn elligator2_decode(Bytes) -> Bytes raise CryptoError
pub fn elligator2_encode(Bytes, high_bits? : Byte, tweak_sign? : Bool) -> Bytes? raise CryptoError
pub fn hkdf(Bytes, Bytes, Bytes, Int32) -> Bytes raise CryptoError
pub fn hkdf_expand(Bytes, Bytes, Int32) -> Bytes raise CryptoError
pub fn hkdf_extract(Bytes, Bytes) -> Bytes
pub fn hmac_sha256(Bytes, Bytes) -> Bytes
pub fn poly1305_mac(Bytes, Bytes) -> Bytes raise CryptoError
pub fn sha256(Bytes) -> Bytes
pub fn sha512(Bytes) -> Bytes
pub fn siphash_2_4(Bytes, Bytes) -> UInt64 raise CryptoError
pub fn x25519(Bytes, Bytes) -> Bytes raise CryptoError
pub fn x25519_public_key(Bytes) -> Bytes raise CryptoError
// Errors
#derive(Eq, @debug.Debug)
pub suberror CryptoError {
InvalidKeyLength(String)
InvalidNonceLength(String)
InvalidLength(String)
AuthenticationFailed
}
// Types and methods
pub struct Sha256 {
state : FixedArray[UInt32]
block : FixedArray[Byte]
mut block_len : Int32
mut total_len : UInt64
}
pub fn Sha256::finalize(Self) -> Bytes
pub fn Sha256::new() -> Self
pub fn Sha256::update(Self, Bytes) -> Unit
pub struct Sha512 {
state : FixedArray[UInt64]
block : FixedArray[Byte]
mut block_len : Int32
mut total_len_lo : UInt64
mut total_len_hi : UInt64
}
pub fn Sha512::finalize(Self) -> Bytes
pub fn Sha512::new() -> Self
pub fn Sha512::update(Self, Bytes) -> Unit
// Type aliases
// Traits