{"id":20459589,"url":"https://github.com/ticesoftware/hkdf","last_synced_at":"2025-04-13T05:51:12.673Z","repository":{"id":56913527,"uuid":"185011564","full_name":"TICESoftware/HKDF","owner":"TICESoftware","description":"Provides a HKDF based on libsodium via swift-sodium","archived":false,"fork":false,"pushed_at":"2021-06-01T12:40:46.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T22:48:24.700Z","etag":null,"topics":["swift","tice-app","tice-crypto"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TICESoftware.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":"2019-05-05T09:43:34.000Z","updated_at":"2022-04-28T12:42:50.000Z","dependencies_parsed_at":"2022-08-20T20:50:33.768Z","dependency_job_id":null,"html_url":"https://github.com/TICESoftware/HKDF","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FHKDF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FHKDF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FHKDF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TICESoftware%2FHKDF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TICESoftware","download_url":"https://codeload.github.com/TICESoftware/HKDF/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670500,"owners_count":21142901,"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":["swift","tice-app","tice-crypto"],"created_at":"2024-11-15T12:16:43.358Z","updated_at":"2025-04-13T05:51:12.650Z","avatar_url":"https://github.com/TICESoftware.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HKDF\n\nHMAC-based Extract-and-Expand Key Derivation Function (HKDF) as defined in \u003ca href=\"https://tools.ietf.org/html/rfc5869\"\u003eRFC 5869\u003c/a\u003e.\nThe HMAC is provided by libsodium which uses the HMAC-SHA-512/256 algorithm.\n\n## Installation\n### SPM\n`.package(url: \"https://github.com/TICESoftware/HKDF.git\", .upToNextMajor(from: \"1.0.0\"))`\n\nIn order to build the library it is necessary to link libsodium. The \u003ca href=\"https://github.com/jedisct1/libsodium\"\u003eofficial repository\u003c/a\u003e includes scripts to build binaries for specific platforms.\n\n`swift build -Xcc -I[header search path] -Xlinker -L[binary path]`\n\nWhen using Xcode you can set the header search path manually to include the libsodium header files and link the static libsodium library.\n\n### CodoaPods\n`pod 'HKDF'`\n\nThis uses \u003ca href=\"https://github.com/jedisct1/swift-sodium\"\u003e`Sodium`\u003c/a\u003e as a dependency which includes the pre-compiled libsodium library. No further setup necessary.\n\n## Usage\nFor deriving a new key of length 32 bytes from some input keying material `ikm`:\n\n```swift\nimport HKDF\n\nlet ikm = \"Input key\".bytes\nlet hkdfKey = try! deriveHKDFKey(ikm: ikm, L: 32)\n```\n\nA `salt` and some application specific info string (which is hashed into the HMAC) can additionally be provided:\n\n`try deriveHKDFKey(ikm: ikm, salt: salt, info: \"Info\", L: 32)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticesoftware%2Fhkdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fticesoftware%2Fhkdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fticesoftware%2Fhkdf/lists"}