Skip to content

Security: pilot-repl/bls12-381

Security

.github/SECURITY.md

Security Policy

πŸ”’ Security Philosophy

The BLS12-381 signature library is cryptographic infrastructure that demands the highest security standards. We take security vulnerabilities extremely seriously and respond to them with urgent priority.

This software is used in production systems handling valuable cryptographic operations. Security is not negotiable.

🚨 Supported Versions

Version Supported Status
0.1.x βœ… Active Full security support
< 0.1.0 ❌ Deprecated No security updates

πŸ›‘οΈ Security Scope

In Scope

  • Cryptographic Vulnerabilities

    • Signature forgery attacks
    • Key recovery attacks
    • Timing attacks and side-channel analysis
    • Weak randomness or key generation flaws
  • Memory Safety Issues

    • Buffer overflows and underflows
    • Use-after-free vulnerabilities
    • Memory leaks in cryptographic contexts
    • Uninitialized memory access
  • Implementation Vulnerabilities

    • Input validation bypass
    • Integer overflow in cryptographic operations
    • Race conditions in multi-threaded code
    • Improper error handling exposing sensitive data

Out of Scope

  • Issues in dependencies (report to upstream projects)
  • Theoretical cryptographic attacks on BLS12-381 itself
  • Performance optimizations without security impact
  • Documentation typos or minor formatting issues

πŸ” Vulnerability Reporting

DO NOT create public GitHub issues for security vulnerabilities.

Responsible Disclosure Process

  1. Email: Send details to security@zkevm.dev
  2. Subject: [SECURITY] BLS12-381 Vulnerability Report
  3. Content: Include all details specified below

Required Information

**Vulnerability Type**: [Memory Safety | Cryptographic | Implementation | Other]

**Severity Assessment**: [Critical | High | Medium | Low]

**Component Affected**: [Signing | Verification | Aggregation | Key Generation | Other]

**Attack Vector**: [Local | Network | Physical | Other]

**Description**: 
Detailed technical description of the vulnerability

**Proof of Concept**:
```zig
// Minimal reproducible example
const vulnerable_code = try library.vulnerableFunction(crafted_input);

Impact Assessment:

  • What can an attacker achieve?
  • What systems/data are at risk?
  • How difficult is exploitation?

Suggested Fix (if you have one): Brief technical approach to remediation

Disclosure Timeline: Any constraints on public disclosure timing


## πŸ“… Response Timeline

| Severity | Initial Response | Investigation | Fix Development | Public Disclosure |
|----------|------------------|---------------|-----------------|-------------------|
| **Critical** | 24 hours | 48 hours | 7 days | 14 days |
| **High** | 48 hours | 5 days | 14 days | 30 days |
| **Medium** | 5 days | 14 days | 30 days | 60 days |
| **Low** | 7 days | 30 days | 60 days | 90 days |

### Critical Vulnerabilities
Issues that allow:
- Signature forgery or key recovery
- Remote code execution
- Memory corruption leading to arbitrary code execution
- Bypass of all cryptographic protections

## πŸ† Security Researcher Recognition

### Hall of Fame
We maintain a security researchers hall of fame for responsible disclosures:

*No entries yet - be the first!*

### Rewards
While we don't have a formal bug bounty program, we recognize security researchers:
- Public credit in release notes and hall of fame
- Direct communication with maintainers
- Priority review of any future contributions
- Recommendation letters for exceptional research

## πŸ”§ Security Best Practices for Contributors

### Code Review Focus Areas
- **Input Validation**: Every external input must be validated
- **Memory Management**: All allocations must have clear ownership
- **Error Handling**: Never expose sensitive data in error messages
- **Timing Attacks**: Be aware of variable-time operations
- **Side Channels**: Consider cache timing and power analysis

### Secure Development Guidelines
```zig
// βœ… Good: Input validation
pub fn processSignature(sig_bytes: []const u8) !Signature {
    if (sig_bytes.len != SIGNATURE_SIZE) {
        return error.InvalidSignatureLength;
    }
    // ... continue with validated input
}

// ❌ Bad: No validation
pub fn processSignature(sig_bytes: []const u8) !Signature {
    // Assumes input is correct - SECURITY VULNERABILITY
}

// βœ… Good: Secure memory clearing
pub fn sensitiveOperation(secret: []u8) !void {
    defer std.crypto.utils.secureZero(u8, secret);
    // ... use secret
}

// ❌ Bad: Secrets left in memory
pub fn sensitiveOperation(secret: []u8) !void {
    // ... use secret
    // Secret remains in memory - SECURITY ISSUE
}

πŸ“Š Security Testing

Required Security Tests

  • Fuzzing: All input parsing functions
  • Memory Safety: Valgrind/AddressSanitizer clean
  • Timing Analysis: No variable-time crypto operations
  • Side Channel: Power analysis resistant (where applicable)

Continuous Security

  • All dependencies scanned for known vulnerabilities
  • Regular cryptographic security reviews
  • Automated memory safety testing in CI/CD
  • Performance regression detection (timing attack prevention)

πŸ” Cryptographic Guarantees

What We Promise

  • Signature Security: 128-bit security level
  • Memory Safety: No buffer overruns or memory corruption
  • Implementation Correctness: Full compliance with BLS standards
  • Side-Channel Resistance: Constant-time where cryptographically required

What We Don't Promise

  • Quantum Resistance: BLS12-381 is not post-quantum secure
  • Perfect Forward Secrecy: Not applicable to signature schemes
  • Anonymous Signatures: BLS signatures are not zero-knowledge proofs

πŸ“ž Contact

  • Security Issues: security@zkevm.dev
  • General Questions: Use GitHub Discussions
  • Public Issues: GitHub Issues (non-security only)

Remember: When in doubt about whether something is a security issue, err on the side of caution and use private disclosure.

There aren’t any published security advisories