Skip to content

1.0.0

Latest

Choose a tag to compare

@DmitryBespalov DmitryBespalov released this 19 Nov 20:59
· 3 commits to main since this release

Neptune 1.0.0

We're excited to announce the first stable release of Neptune! A high-performance Swift package providing secp256k1 elliptic curve cryptography functionality, built on top of bitcoin-core/secp256k1.

✨ Features

  • ✅ ECDSA Signatures - Create and verify signatures with compact (64-byte) and DER (70-72 byte) formats
  • ✅ Key Management - Generate and serialize secret/public keys in compressed (33-byte) and uncompressed (65-byte) formats
  • ✅ Recoverable Signatures - Recover public keys from signatures and message hashes
  • ✅ Swift-Native API - Clean, type-safe Swift interface with comprehensive error handling
  • ✅ Security - Context randomization, automatic secret key memory clearing, input validation
  • ✅ Performance - Built on optimized secp256k1 with static context support for zero-allocation operations

📦 Requirements

  • Swift 6.0+
  • iOS 15.0+ / macOS 13.0+ / tvOS 15.0+ / watchOS 8.0+ / visionOS 1.0+

🚀 Installation

dependencies: [
    .package(url: "https://github.com/bespalov-software/Neptune.git", from: "1.0.0")
]

📚 Quick Start

import Neptune

let secp256k1 = try SECP256K1()
let secretKey = try secp256k1.secretKey()
let publicKey = try secp256k1.publicKey(secretKey: secretKey)

// Sign and verify
let signature = try secretKey.sign(messageHash: messageHash)
let isValid = publicKey.verify(signature: signature, messageHash: messageHash)

// Recoverable signatures
let recoverableSig = try secretKey.signRecoverable(messageHash: messageHash)
let recoveredKey = SECP256K1.PubKey.recover(signature: recoverableSig, messageHash: messageHash)

📖 Documentation

See the README for full documentation, API reference, and examples.

🙏 Acknowledgments

Built on bitcoin-core/secp256k1. Licensed under MIT.