Gateway’s PRE implementation is optimized for both performance and security. These benchmarks provide insights into the performance characteristics of different operations across various scenarios.

Core Operations

Single Operations

OperationAverage TimeMemory UsageNotes
Key Generation5.2ms2.4KBOne-time cost per user
Transform Key Gen10.1ms3.2KBCan be pre-computed
Encryption (1KB)2.3ms4.8KBIncludes DEK generation
Transform5.4ms2.8KBConstant time
Decryption (1KB)2.1ms4.2KBIncludes DEK recovery

Scaling with Data Size

Multi-hop Performance

Transform Chain Length Impact

HopsTotal TimeMemory PeakNetwork I/O
15.4ms2.8KB1.2KB
210.9ms3.2KB2.4KB
316.4ms3.6KB3.6KB
421.8ms4.0KB4.8KB

Batch Processing

Batch SizeAvg Time/ItemTotal TimeMemory Usage
15.4ms5.4ms2.8KB
104.2ms42ms12KB
1003.8ms380ms96KB
10003.5ms3.5s840KB

Network Performance

Latency Impact

Throughput

ScenarioOperations/secBandwidth Required
Single Node185240KB/s
Cluster (3 nodes)520680KB/s
Cluster (10 nodes)16502.1MB/s

Hardware Impact

CPU Utilization

OperationSingle CoreMulti CoreGPU Accelerated
Key Gen100%35%N/A
Transform80%30%N/A
Batch Transform100%85%N/A

Memory Profile

ComponentBase UsagePeak UsageNotes
Service24MB128MBPer instance
Transform Cache12MB64MBConfigurable
Key Storage8MB32MBScales with users

Optimization Tips

  1. Batch Processing

    • Group related transforms
    • Pipeline operations
    • Use connection pooling
  2. Key Management

    • Pre-compute transform keys
    • Cache hot keys
    • Implement key rotation
  3. Network Optimization

    • Use connection pooling
    • Implement request batching
    • Consider geographical distribution

Comparison with Other Systems

SystemKey GenTransformMemory UsageSecurity Level
Gateway PRE5.2ms5.4msLow256-bit
NuCypher8.1ms7.2msMedium256-bit
AFGH12.3ms9.8msHigh128-bit
BBS984.2ms4.8msLow128-bit