clock-curve-math 1.1.3

High-performance, constant-time, cryptography-grade number theory library for ClockCurve ecosystem
Documentation
# Contributing to clock-curve-math

Thank you for your interest in contributing to `clock-curve-math`! This document provides guidelines for contributors.

## Development Setup

### Prerequisites
- Rust 1.70+ with 2024 edition support
- Cargo package manager

### Building
```bash
# Clone the repository
git clone https://github.com/olyntar/clock-curve-math.git
cd clock-curve-math

# Build in debug mode
cargo build

# Build in release mode
cargo build --release

# Run tests
cargo test

# Run benchmarks
cargo bench
```

### Feature Development
```bash
# Test specific features
cargo test --features custom-limbs
cargo test --features bigint-backend,alloc

# Build documentation
cargo doc --open
```

## Code Standards

### Rust Guidelines
- Follow the [Rust API Guidelines]https://rust-lang.github.io/api-guidelines/
- Use `rustfmt` for code formatting
- Pass `clippy` lint checks
- Write comprehensive documentation for public APIs

### Security Requirements
- All cryptographic operations must be constant-time
- No timing side-channels allowed
- Comprehensive input validation required
- Memory safety guaranteed

### Testing Requirements
- Unit tests for all public functions
- Property-based tests where applicable
- Integration tests for feature combinations
- Performance regression tests
- Cross-platform compatibility tests

## Contribution Process

### 1. Issue Creation
- Check existing issues before creating new ones
- Use appropriate issue templates
- Provide clear reproduction steps for bugs

### 2. Development
- Create feature branches from `master`
- Follow conventional commit message format
- Write tests for new functionality
- Update documentation as needed

### 3. Code Review
- Ensure CI passes for all configurations
- Request review from maintainers
- Address review feedback promptly
- Squash commits before merge

### 4. Release Process
- Version bumps follow semantic versioning
- Breaking changes require deprecation cycle
- Release notes required for all changes

## Feature Flags

### Backend Selection
- `bigint-backend` (default): Uses `clock-bigint` for performance
- `custom-limbs`: Pure Rust, no_std compatible

### Optional Features
- `alloc`: Heap allocations for advanced operations
- `std`: Full standard library support
- `rand`: Random generation support
- `serde`: Serialization support

### Testing Features
- `simd`: SIMD optimizations (experimental)

## Performance Considerations

### Constant-Time Requirements
- All cryptographic operations must execute in constant time
- Use `subtle` crate for constant-time operations where applicable
- Avoid data-dependent control flow
- Minimize memory access patterns

### Optimization Guidelines
- Profile before optimizing
- Maintain constant-time guarantees
- Document performance characteristics
- Consider cache efficiency

## Documentation

### API Documentation
- All public items must have documentation
- Include usage examples where helpful
- Document feature flag requirements
- Explain error conditions

### User Guides
- Installation instructions
- Feature selection guidance
- Migration guides for breaking changes
- Troubleshooting documentation

## Security

### Vulnerability Reporting
- Report security issues privately to maintainers
- Allow 90 days for fixes before public disclosure
- Security updates released as patches

### Security Reviews
- All changes reviewed for security implications
- Cryptographic code requires additional scrutiny
- Timing attack analysis required for new operations

## Community

### Communication
- GitHub issues for bug reports and feature requests
- GitHub discussions for general questions
- Discord/Forum for community discussions

### Code of Conduct
- Be respectful and inclusive
- Focus on constructive feedback
- Maintain professional communication
- See [CODE_OF_CONDUCT.md]CODE_OF_CONDUCT.md for full details

## License

By contributing to this project, you agree that your contributions will be licensed under the same license as the project (MIT OR Apache-2.0).

## Acknowledgments

Thank you for contributing to the security and performance of cryptographic software! Your efforts help protect users worldwide.