搜尋套件、儲存庫與 APP 分類

套件詳情v1.1.1

sec

高效加密標準(SEC)的實現,包含 SECP256K1 和 SECP256R1。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
4.6萬
喜歡數
4
Pub 分數
160

安裝套件

flutter pub add sec

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

sec 套件提供高效加密標準(SEC)的實作,特別支援 SECP256K1 與 SECP256R1 橢圓曲線。它讓 Dart 應用程式能在多個平台安全執行金鑰產生、簽章與驗證等加密運算。此套件專為從事區塊鏈、數位簽章或安全通訊的開發者設計,提供基於 ECC 的安全功能可靠基礎。該套件為開源並持續積極開發維護。

適用情境

  • 區塊鏈應用開發
  • 數位簽章產生
  • 安全密鑰交換
  • 認證協議
  • 加密貨幣錢包整合
  • 安全的API通訊

主要特色

  • 支援 SECP256K1 和 SECP256R1 曲線
  • 跨平台相容性
  • 開源且持續維護
  • 輕量級加密操作
  • 與 Flutter 應用整合
  • 強大的ECC實現

適合對象

  • 開發區塊鏈工具的開發者
  • 需要安全數位簽章的應用程式
  • 使用比特幣或以太坊類似加密技術的項目
  • 需要ECC支援的Flutter應用
  • 注重安全的行動和網路應用

使用建議

  • 需要理解橢圓曲線密碼學
  • 不適合非加密使用案例
  • 依賴底層平台加密庫
  • 最佳搭配正確的安全實踐使用
  • 限於特定的符合SEC的曲線
  • 在生產環境中可能需要額外的驗證

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

package publisher

Implementation of Standards for Efficient Cryptography (SEC) including SECP256K1 and SECP256R1.

Features

  • PublicKey Recovery Id Calculation.
  • Secp160r1
  • Secp160r2
  • Secp192k1
  • Secp192r1
  • Secp224k1
  • Secp224r1
  • Secp256k1 (Commonly used in cryptocurrencies)
  • Secp256r1
  • Secp384r1
  • Secp521r1
  • Brainpoolp160r1
  • Brainpoolp160t1
  • Brainpoolp192r1
  • Brainpoolp192t1
  • Brainpoolp224r1
  • Brainpoolp224t1
  • Brainpoolp256r1
  • Brainpoolp256t1
  • Brainpoolp320r1
  • Brainpoolp320t1
  • Brainpoolp384r1
  • Brainpoolp384t1
  • Brainpoolp512r1
  • Brainpoolp512t1
  • Gostr3410_2001_cryptopro_a
  • Gostr3410_2001_cryptopro_b
  • Gostr3410_2001_cryptopro_c
  • Gostr3410_2001_cryptopro_xcha
  • Gostr3410_2001_cryptopro_xchb
  • Prime192v1
  • Prime192v2
  • Prime192v3
  • Prime239v1
  • Prime239v2
  • Prime239v3
  • Prime256v1
  • Secp112r1
  • Secp112r2
  • Secp128r1
  • Secp128r2
  • Secp160k1

Getting started

dependencies:
  sec: any

Usage

import 'package:sec/sec.dart';
import 'package:convert/convert.dart';
final privateKey = BigInt.parse(
'c57304b3a53051600d7035fc593083810a8fa250e6a7a2803cf6a0f3c2750503',
radix: 16,
);

final publicKey = Secp256k1.createPublicKey(privateKey, true);
final pkHex = hex.encode(publicKey);
print('Public Key: $pkHex');

// 03566b04ce8459c8e2f95691ff17625a0b84773ecd2b65f597c05bd90fa8609ed6

Additional information

This package uses pointycastle.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案