Libra

Libra

  • 文档
  • 社区
  • 博客
  • libra-china.org
  • GitHub

›READMEs

学习 Libra

  • 欢迎
  • Libra协议: 核心概念
  • 交易生命周期
  • Technical Papers

    • The Libra Blockchain
    • Move: A Language With Programmable Resources
    • State Machine Replication in the Libra Blockchain

体验 Libra Core

  • 第一笔交易!
  • Move语言初体验

社区

  • 开源:Libra区块链的基础
  • 贡献代码
  • Coding Guidelines
  • Reporting Vulnerabilities

Libra 代码库

  • Libra Core 概要
  • READMEs

    • Admission Control
    • Bytecode Verifier
    • Consensus
    • Crypto
    • Execution
    • Mempool
    • Move IR Compiler
    • Move Language
    • Network
    • Storage
    • Virtual Machine

参考

  • Libra CLI
  • Glossary
Edit

Crypto

The crypto component hosts all the implementations of cryptographic primitives we use in Libra: hashing, signing, and key derivation/generation. The NextGen directory contains implementations of cryptographic primitives that will be used in the upcoming versions: new crypto API Enforcing type safety, verifiable random functions, BLS signatures.

Overview

Libra makes use of several cryptographic algorithms:

  • SHA-3 as the main hash function. It is standardized in FIPS 202. It is based on the tiny_keccak library.
  • X25519 to perform key exchanges. It is used to secure communications between validators via the Noise Protocol Framework. It is based on the x25519-dalek library.
  • Ed25519 to perform signatures. It is used both for consensus signatures and for transaction signatures. EdDSA is planned to be added to the next revision of FIPS 186 as mentioned in NIST SP 800-133 Rev. 1. It is based on the ed25519-dalek library with additional security checks (e.g., for malleability).
  • HKDF: HMAC-based Extract-and-Expand Key Derivation Function (HKDF) based on RFC 5869. It is used to generate keys from a salt (optional), seed, and application-info (optional).

How is this module organized?

    legacy_crypto/src
    ├── signing.rs          # Ed25519 signature scheme
    ├── hash.rs             # Hash function (SHA-3)
    ├── hkdf.rs             # HKDF implementation (HMAC-based Extract-and-Expand Key Derivation Function based on RFC 5869)
    ├── x25519.rs           # X25519 keys generation
    ├── macros/             # Derivations for SilentDebug and SilentDisplay
    ├── utils.rs            # Serialization utility functions
    ├── unit_tests          # Tests
    └── lib.rs

Currently x25519.rs only exposes the logic for managing keys. The relevant cryptographic primitives to the Noise Protocol Framework are under the snow crate.

← ConsensusExecution →
  • Overview
  • How is this module organized?
Libra
Learn About Libra
Welcome to LibraLibra ProtocolLibra BlockchainLife of a Transaction

Try Libra Core
My First TransactionGetting Started With Move
Policies
Privacy PolicyTerms of UseCookies PolicyCode of Conduct
Social
libra
Follow @libradev
© Libra Association

To help us provide relevant content, analyze our traffic, and provide a variety of features, we use cookies. By clicking on or navigating the site, you agree to allow us to collect information on and off the Libra Website through cookies. To learn more, view our Cookie Policy:

Cookies Policy