{"id":18452951,"url":"https://github.com/reubenmathew/cipherbox","last_synced_at":"2025-04-22T11:54:59.363Z","repository":{"id":56172669,"uuid":"309527405","full_name":"ReubenMathew/Cipherbox","owner":"ReubenMathew","description":"🔐 UART compatible hardware based FPGA encryption device","archived":false,"fork":false,"pushed_at":"2020-12-24T03:43:00.000Z","size":15678,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T14:25:39.384Z","etag":null,"topics":["arduino","fpga","fpga-encryption","hardware","serial","uart","uart-protocol"],"latest_commit_sha":null,"homepage":"","language":"Verilog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ReubenMathew.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-03T00:17:08.000Z","updated_at":"2024-06-11T13:39:44.000Z","dependencies_parsed_at":"2022-08-15T14:01:01.714Z","dependency_job_id":null,"html_url":"https://github.com/ReubenMathew/Cipherbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenMathew%2FCipherbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenMathew%2FCipherbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenMathew%2FCipherbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ReubenMathew%2FCipherbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ReubenMathew","download_url":"https://codeload.github.com/ReubenMathew/Cipherbox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250237815,"owners_count":21397400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","fpga","fpga-encryption","hardware","serial","uart","uart-protocol"],"created_at":"2024-11-06T07:34:55.206Z","updated_at":"2025-04-22T11:54:59.326Z","avatar_url":"https://github.com/ReubenMathew.png","language":"Verilog","readme":"# Cipherbox\n**Reuben Ninan**\n\n### Description\nThis project was built by myself and was an amazing learning experience to sink my teeth into digital logic design.\n\nMy project is utilizing an FPGA as a hardware accelerated encryption device. FPGAs are a great way to implement encryption algorithms due to the high performance of hardware implementations while maintaining the option for updates in case of a security compromise. \n\nMy project is a verilog implementation of the XOR algorithm which can encrypt/decrypt bytes with a key byte. A stream of bytes can be input with a key stream and produce a manipulated stream of bytes that has either been encrypted/decrypted.\n\nThe XOR cipher is a simple yet effective algorithm, that is used to encrypt/decrypt incoming bytes of data. By leveraging the UART transmission protocol I am able to send bytes of data over a single line at fast speeds.\n\nAn Arduino can both read and write to an FGPA using the `Serial` library:\n```c\nvoid setup(){\n\tSerial.begin(115200); // Serial Baud Rate\n\tSerial.read(); // UART Serial read from RX port\n\tSerial.write(c) // UART Serial write to TX port\n}\n```\n\n### Encryption Module Implementation:\n- 1 pin serial input, for key\n- 1 pin serial input, for (encrypted or plain) bytes\n- 1 pin serial output, for (encrypted or plain) bytes\n\nThe serial inputs utilize an `uart_rx` module to convert the serial data into a register to be used for computation. The `uart_tx` transmitter module is used to convert the parallel encrypted data register into a serial line that can be read by the Arduino. \n\nBoth uart modules are state machines that transmit/receive bits according to the uart protocol which is one start bit, 8 data bits and one stop bit at a specific baud rate (bits/second). Once the Arduino and FPGA are communicating at the same rate information is easily exchanged between the two.\n\nThe flow for using this encryption device is as follows:\n1. Arduino sends plaintext byte and key byte to FPGA\n2. FPGA encrypts (XOR) the plaintext and key bytes together\n3. The resultant byte is transmitted back to the Arduino\n\n### References\n- https://www.nandland.com/vhdl/modules/module-uart-serial-port-rs232.html\n- https://github.com/kithminr1995/verilog_fpga_uart\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubenmathew%2Fcipherbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freubenmathew%2Fcipherbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freubenmathew%2Fcipherbox/lists"}