{"id":23114309,"url":"https://github.com/dimchansky/keeloq-go","last_synced_at":"2025-04-04T00:43:41.870Z","repository":{"id":59046613,"uuid":"532906521","full_name":"dimchansky/keeloq-go","owner":"dimchansky","description":"An implementation of KeeLoq encryption/decryption in Go programming language","archived":false,"fork":false,"pushed_at":"2022-09-05T13:19:01.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T12:31:09.276Z","etag":null,"topics":["golang","keeloq"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimchansky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-09-05T13:10:47.000Z","updated_at":"2024-02-18T14:34:53.000Z","dependencies_parsed_at":"2022-09-11T06:51:49.895Z","dependency_job_id":null,"html_url":"https://github.com/dimchansky/keeloq-go","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/dimchansky%2Fkeeloq-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchansky%2Fkeeloq-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchansky%2Fkeeloq-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchansky%2Fkeeloq-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimchansky","download_url":"https://codeload.github.com/dimchansky/keeloq-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103305,"owners_count":20884023,"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":["golang","keeloq"],"created_at":"2024-12-17T03:29:19.592Z","updated_at":"2025-04-04T00:43:41.852Z","avatar_url":"https://github.com/dimchansky.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KeeLoq\n\nAn implementation of KeeLoq encryption/decryption in Go programming language.\n\n## What is KeeLoq\n\nKeeLoq is a proprietary block cipher owned by [Microchip](https://www.microchip.com/), developed for code-hopping remote key entry (RKE)\ndevices such as:\n\n- [Microchip HCS200](http://ww1.microchip.com/downloads/en/devicedoc/40138c.pdf)\n- [Microchip HCS301](http://ww1.microchip.com/downloads/en/devicedoc/21143b.pdf)\n- [EG Micro EG301](https://www.egmicro.com/download/EG301_datasheet.pdf)\n\nand is used in remote key-less entry systems from several car manufacturers - such as [Chrysler](https://www.chrysler.com/), \n[Fiat](https://www.fiat.com/), [GM](https://www.gm.com/), [Honda](https://www.honda.com/), [Toyota](https://www.toyota.com/), \n[Volvo](https://www.volvocars.com/intl), [VW](https://www.vw.com/), [Jaguar](https://www.jaguar.com/index.html), \n[Iran Khodro](https://www.ikco.ir/en/), etc. - as well as for garage door openers.\n\nAfter the confidential specifications have been leaked on a Russian website ([Code Hopping Decoder using a PIC16C56](http://keeloq.narod.ru/decryption.pdf)) in 2006,\nseveral cryptanalysts have found substantial weaknesses in the design of the algorithm and the hardware on which it is implemented ([Robert R. Enderlein, S Vaudenay, P Sepehrdad. KeeLoq. EPFL, Semester Project 2010.](http://www.e7n.ch/data/e10.pdf)).\n\nPlease note this algorithm is pretty weak and should not be used for any real crypto.\n\n## KeeLoq Encryption\nKeeLoq is a block cipher with a 64-bit key and a 32-bit block size. The cipher operates on two registers for 528 clock cycles to produce the ciphertext, based on the following shape:\n\n![KeeLoq encryption algorithm)](images/KeeLoq-Encryption.png)\n\n## KeyLoq Decryption\nKeeLoq decryption algorithm operates on two registers for 528 rounds, to produce the plaintext for a given key and ciphertext, according to the following shape.\n\n![KeeLoq encryption algorithm)](images/KeeLoq-Decryption.png)\n\n## Test Vectors\n\n| key                  | plaintext    | ciphertext   |\n|----------------------|--------------|--------------|\n| `0xbeefdeadbeefdead` | `0x2000c022` | `0x054c90c2` |\n| `0x5cec6701b79fd949` | `0xf741e2db` | `0xe44f4cdf` | \n| `0x5cec6701b79fd949` | `0x0ca69b92` | `0xa6ac0ea2` |                               ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimchansky%2Fkeeloq-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimchansky%2Fkeeloq-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimchansky%2Fkeeloq-go/lists"}