{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":710992510,"defaultBranch":"main","name":"shamir","ownerLogin":"liqtags","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-10-27T22:57:38.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/13621351?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1698447481.0","currentOid":""},"activityList":{"items":[{"before":"1cc50e256967f75f5c8fd0c4d3b48fe4a66aa1f5","after":"9bb5f699c5b9a996c6e88a78f68e0762ad8486f0","ref":"refs/heads/main","pushedAt":"2023-12-10T14:09:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"Update README.md","shortMessageHtmlLink":"Update README.md"}},{"before":"dacbb9683422e213069a3c37308c7db9c8e2659d","after":"1cc50e256967f75f5c8fd0c4d3b48fe4a66aa1f5","ref":"refs/heads/main","pushedAt":"2023-10-27T23:36:01.000Z","pushType":"pr_merge","commitsCount":21,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"Merge pull request #1 from 0xlino/dev\n\nDev","shortMessageHtmlLink":"Merge pull request #1 from 0xlino/dev"}},{"before":"e281f81f3071e0ed69e7ed35c83b0eeb793d6c4a","after":"978e4e03bb97199e51f2a162a141056cd06b59c3","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:35:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"📝 docs(README.md): update README with explanations and examples of Shamir's secret sharing algorithm\n\n✨ feat(README.md): add examples of using the splitWithPasswordToFile and combineShares functions to demonstrate how to split a secret into shares and combine them to reveal the secret","shortMessageHtmlLink":"📝 docs(README.md): update README with explanations and examples of Sh…"}},{"before":"d29fbd903c1398769d197fd90f165e90ead94dfb","after":"e281f81f3071e0ed69e7ed35c83b0eeb793d6c4a","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:34:57.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"📝 docs(README.md): add explanation of Shamir's secret sharing algorithm and its purpose\n📝 docs(README.md): add function documentation for splitWithPasswordToFile in README.md\n📝 docs(gtp2at_shares.json): add gtp2at_shares.json file containing shares generated by splitWithPasswordToFile function\n📝 docs(index.ts): add main function to split input into shares and combine them back to reveal the secret\n📝 docs(package.json): add package.json file with project information and dependencies\n📝 docs(sss/index.ts): add index file for sss module with exports for split and combine functions","shortMessageHtmlLink":"📝 docs(README.md): add explanation of Shamir's secret sharing algorit…"}},{"before":"2371287b3def583746166822dfa28f02200f31b7","after":"d29fbd903c1398769d197fd90f165e90ead94dfb","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:34:09.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"🎉 feat(split.ts): add split function to split a secret into shares\n\nThe `split` function takes a `secret` value and splits it into a specified number of `shares`, requiring a minimum number of `threshold` shares to reconstruct the original secret.\n\nThe function performs the following steps:\n- Validates the input arguments: `secret` must be a non-empty `Uint8Array`, `shares` must be a number between 2 and 255, and `threshold` must be a number between 2 and 255.\n- Creates an array to store the resulting shares.\n- Generates x-coordinates for the shares.\n- Iterates over the number of shares and creates a new share array with the last element set as the x-coordinate.\n- Calculates the coefficients for each byte of the secret and evaluates the polynomial for each share to determine the y-coordinate.\n- Returns the resulting array of shares.\n\nThis function enables the secure sharing of secrets for cryptographic purposes.","shortMessageHtmlLink":"🎉 feat(split.ts): add split function to split a secret into shares"}},{"before":"e654a67736a0929997c285a04d5c8adcc52b6d33","after":"2371287b3def583746166822dfa28f02200f31b7","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:33:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"📦 chore(newCoordinates.ts): add newCoordinates function to generate a pseudo-random shuffling of a set of values\n🔒 refactor(newCoordinates.ts): use getRandomBytes function to generate pseudo-random indices for shuffling the coordinates array\n🔀 refactor(newCoordinates.ts): improve the mapping of random bytes to indices by handling the case where the byte is 255 and wrapping around to 0","shortMessageHtmlLink":"📦 chore(newCoordinates.ts): add newCoordinates function to generate a…"}},{"before":"b1f5eecd6e7c3416bf0e1fddb0a131a641f88f72","after":"e654a67736a0929997c285a04d5c8adcc52b6d33","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:33:48.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"✨ feat(newCoefficients.ts): add function to generate pseudo-random set of coefficients for a polynomial\n\nThe newCoefficients function generates a set of coefficients for a polynomial. The function takes two parameters: intercept, which is the first byte of the coefficients array, and degree, which determines the length of the coefficients array. The function creates a new Uint8Array with a length of degree + 1. The first byte of the array is set to the intercept value. For each subsequent byte, the function generates a random byte using the getRandomByte function, except for the last byte (t-1), which cannot be zero and is generated using the getNonZeroRandomByte function. The function returns the generated coefficients array.","shortMessageHtmlLink":"✨ feat(newCoefficients.ts): add function to generate pseudo-random se…"}},{"before":"0dfa8f77234c322db74a0abc64b730b59e53964e","after":"b1f5eecd6e7c3416bf0e1fddb0a131a641f88f72","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:33:32.000Z","pushType":"push","commitsCount":11,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"📦 chore(mult.ts): add new file mult.ts to implement multiplication in GF(2^8)\n🔧 refactor(mult.ts): improve error handling by throwing RangeError if input numbers are out of Uint8 range\n🔧 refactor(mult.ts): calculate multiplication result using logarithm and exponentiation tables for better performance and accuracy","shortMessageHtmlLink":"📦 chore(mult.ts): add new file mult.ts to implement multiplication in…"}},{"before":"6b44b702655cda7b120f715e4a4652d1ae7dd5ad","after":"0dfa8f77234c322db74a0abc64b730b59e53964e","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:30:46.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"✨ feat(add.ts): add function to combine two numbers in GF(2^8) for addition and subtraction\n\nThe `add.ts` file contains a new function `add` that takes two numbers as parameters and combines them in GF(2^8) using the XOR operation. This function can be used for both addition and subtraction. It also includes input validation to ensure that the numbers are within the range of Uint8. If any of the numbers are out of range, a `RangeError` is thrown.","shortMessageHtmlLink":"✨ feat(add.ts): add function to combine two numbers in GF(2^8) for ad…"}},{"before":"6c936d353e975e78927bea265a04ed237549e6c1","after":"6b44b702655cda7b120f715e4a4652d1ae7dd5ad","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:30:24.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"✨ feat(splitWithPasswordToFile.ts): add new function splitWithPasswordToFile to split input data with a password and write the split data to a file","shortMessageHtmlLink":"✨ feat(splitWithPasswordToFile.ts): add new function splitWithPasswor…"}},{"before":"8350cf7f48264412fe41863cd67e2ddb62922834","after":"6c936d353e975e78927bea265a04ed237549e6c1","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:29:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"📦 chore(shamir.ts): add Shamir secret sharing implementation\n\nThis commit adds the implementation of Shamir secret sharing in the `shamir.ts` file. Shamir secret sharing is a cryptographic algorithm that allows a secret to be divided into multiple shares, where a subset of the shares is required to reconstruct the original secret.\n\nThe `shamir.ts` file includes the following changes:\n- Import the `combine` and `split` functions from the `sss` module.\n- Import the `crypto` module for cryptographic operations.\n- Define the `CryptoParams` type for the cryptographic parameters used in the `Share` type.\n- Define the `Share` type to represent a share of a secret.\n- Implement the `decryptShareWithPassword` function to decrypt a share using a password.\n- Implement the `encryptShare` function to encrypt a share using a password.\n- Implement the `bufferToHex` and `hexToBuffer` utility functions for converting between buffers and hexadecimal strings.\n- Implement the `computeSHA512` function to compute the SHA-512 hash of a Uint8Array.\n- Export the `splitWithPasswordAsStore` function to split a secret into shares encrypted with a password.\n- Export the `decryptAndCombineWithPassword` function to decrypt and combine shares using a password.\n\nThese changes enable the use of Shamir secret sharing for securely splitting and combining secrets.","shortMessageHtmlLink":"📦 chore(shamir.ts): add Shamir secret sharing implementation"}},{"before":"dacbb9683422e213069a3c37308c7db9c8e2659d","after":"8350cf7f48264412fe41863cd67e2ddb62922834","ref":"refs/heads/dev","pushedAt":"2023-10-27T23:29:31.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"✨ feat(combineShares.ts): add combineShares function to combine shares using a password\n\nThe `combineShares.ts` file was added to the project. It contains a new function `combineShares` that takes a file path and a password as parameters.\n\nThe function reads the contents of the file specified by the file path, parses it as JSON, and then uses the `decryptAndCombineWithPassword` function from the `shamir` module to combine the shares using the provided password. The combined secret is then returned by the function.","shortMessageHtmlLink":"✨ feat(combineShares.ts): add combineShares function to combine share…"}},{"before":null,"after":"dacbb9683422e213069a3c37308c7db9c8e2659d","ref":"refs/heads/dev","pushedAt":"2023-10-27T22:58:01.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"Initial commit","shortMessageHtmlLink":"Initial commit"}},{"before":null,"after":"dacbb9683422e213069a3c37308c7db9c8e2659d","ref":"refs/heads/main","pushedAt":"2023-10-27T22:57:39.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"liqtags","name":"Liquid","path":"/liqtags","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/13621351?s=80&v=4"},"commit":{"message":"Initial commit","shortMessageHtmlLink":"Initial commit"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADxoRsTgA","startCursor":null,"endCursor":null}},"title":"Activity · liqtags/shamir"}