Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

6502 Implementation of the ChaCha20 Encryption Algorithm

This implementation of the ChaCha20 encryption algorithm has been heavily optimized, drawing inspiration from the excellent analysis provided in:
ChaCha20 Performance on PDP-11.

Performance and Throughput

  • Due to interrupts being disabled during encryption/decryption, throughput measurements must be conducted using an external timer device.
  • Benchmarks indicate a throughput of approximately 950 bytes per second, which is roughly 6 times slower than on a PDP-11/40. Despite this, the performance is quite respectable, given the hardware constraints of the 6502.

Verification

To verify the correctness of the implementation:

  1. Compare the encrypted output of block #1 against the expected byte sequence specified in RFC 7539, titled "ChaCha20 and Poly1305 for IETF Protocols", published by the Internet Engineering Task Force (IETF) in May 2015.
  2. The RFC includes test vectors that can be used for validation. The serialized block output for comparison is provided at line 47 in the header of test.c.

With this approach, you can ensure the implementation adheres to the expected behavior defined in the RFC, making it a fast and reliable implementation of ChaCha20 for the 6502.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages