Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YACL ECC 模块支持 FourQ 曲线 #158

Closed
Candicepan opened this issue Nov 2, 2023 · 9 comments
Closed

YACL ECC 模块支持 FourQ 曲线 #158

Candicepan opened this issue Nov 2, 2023 · 9 comments
Assignees
Labels
OSCP SecretFlow Open Source Contribution Plan WIP: community This issue is currently under development by a community member

Comments

@Candicepan
Copy link
Contributor

Candicepan commented Nov 2, 2023

此 ISSUE 为 隐语开源共建计划(SecretFlow Open Source Contribution Plan,简称 SF OSCP)任务 ISSUE,欢迎社区开发者参与共建~
若有感兴趣想要认领的任务,但还未报名,辛苦先完成报名进行哈~

任务介绍

  • 任务名称:YACL 支持 FourQ 曲线
  • 技术方向:ECC 椭圆曲线密码学
  • 任务难度:热身🌟
    • 任务期望时间:2-3 周

详细要求

YACL ECC 模块位于 yacl/crypto/base/ecc 路径下, ecc_spi.h 是模块的总入口,所有椭圆曲线遵循相同的接口。目前 ECC 模块已经实现了大部分主流曲线,但是缺少 fourq,本任务需要在 ECC 模块中集成/实现 fourq 曲线。
关于 fourq 曲线更详细的介绍可参考此 paper https://eprint.iacr.org/2015/565.pdf
鉴于微软已经实现了 FourQlib,简单起见您可以直接集成此 Lib 到 YACL

能力要求

  • 精通 C++ 语言
  • 了解基本 git 操作
  • 了解椭圆曲线密码学(ECC)

操作说明

  • 请在 YACL ECC 模块 中新建一个文件夹存放您的代码
  • 集成方式可参考 ECC 下其它 Lib 的集成方法,一般由一个 xxxGroup 实现曲线主体功能;一个 factory 用于创建曲线实例;一个 test 类用于单测
  • 集成完成后请执行 bazel run -c opt //yacl/crypto/base/ecc/benchmark:benchmark -- --curve=ed25519 运行性能测试
@Candicepan Candicepan added good first issue OSCP SecretFlow Open Source Contribution Plan labels Nov 2, 2023
@Candicepan Candicepan transferred this issue from secretflow/spu Nov 2, 2023
@Candicepan Candicepan moved this to Needs Triage in OSCP Phase 3 Nov 3, 2023
@Tonytan123
Copy link

Tonytan123 commented Nov 15, 2023

【Tonytan123 Give it to me】

@Candicepan Candicepan moved this from Needs Triage to In Progress in OSCP Phase 3 Nov 15, 2023
@Tonytan123
Copy link

yacl项目引入微软的fourq库,但是当前的fourq库只有git仓(https://github.com/microsoft/FourQlib),有看到yacl项目引入三方库如下所示:
def _com_github_libsodium():
maybe(
http_archive,
name = "com_github_libsodium",
type = "tar.gz",
strip_prefix = "libsodium-1.0.18",
sha256 = "6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1",
build_file = "@yacl//bazel:libsodium.BUILD",
urls = [
"https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz",
],
)
引入的三方库都有完整的tar.gz文件可以下载,但是微软的fourq仓库只有git仓,这该怎么引入?

@usafchn
Copy link
Member

usafchn commented Dec 12, 2023

@Tonytan123 可以用 new_git_repository 函数

例子

@anakinxc
Copy link
Collaborator

yacl项目引入微软的fourq库,但是当前的fourq库只有git仓(https://github.com/microsoft/FourQlib),有看到yacl项目引入三方库如下所示: def _com_github_libsodium(): maybe( http_archive, name = "com_github_libsodium", type = "tar.gz", strip_prefix = "libsodium-1.0.18", sha256 = "6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1", build_file = "@yacl//bazel:libsodium.BUILD", urls = [ "https://download.libsodium.org/libsodium/releases/libsodium-1.0.18.tar.gz", ], ) 引入的三方库都有完整的tar.gz文件可以下载,但是微软的fourq仓库只有git仓,这该怎么引入?

github 所有的 commit 都可以变成一个 tar.gz 的包,fourq 就用
https://github.com/microsoft/FourQlib/archive/{commit}.tar.gz

@Candicepan
Copy link
Contributor Author

【Tonytan123 Give it to me】

感谢您的认领。经沟通,该任务先进行回收,欢迎认领更适合您的任务呀~

@Candicepan Candicepan moved this from In Progress to Needs Triage in OSCP Phase 3 Jan 18, 2024
@Candicepan Candicepan removed this from OSCP Phase 3 Mar 8, 2024
@Candicepan Candicepan added this to OSCP Mar 8, 2024
@Candicepan Candicepan moved this to Needs Triage in OSCP Mar 8, 2024
@cfbreathing
Copy link

【cfbreathing Give it to me】

@Candicepan Candicepan moved this from Needs Triage to In Progress in OSCP Mar 11, 2024
@Jamie-Cui Jamie-Cui added the WIP: community This issue is currently under development by a community member label Mar 14, 2024
@muyixi315
Copy link

bazel run -c opt //yacl/crypto/ecc/benchmark:benchmark -- --curve=ed25519 image

@Yeekin-GYJ
Copy link

hi muyixi315,改项目已由cfbreathing认领进行任务开发,可以看下其他OSCP的任务哦,欢迎认领呀!认领前记得填写OSCP报名表,感谢对隐语的关注~ 如有疑问欢迎添加小助手微信:SecretFlow04

@Candicepan
Copy link
Contributor Author

【cfbreathing Give it to me】

感谢你对隐语开源的支持呀~该功能已由隐语内部已经实现,预计在下个版本中发布实现后的功能。欢迎认领其他感兴趣的任务呀~

@github-project-automation github-project-automation bot moved this from In Progress to Done in OSCP Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OSCP SecretFlow Open Source Contribution Plan WIP: community This issue is currently under development by a community member
Projects
Status: Done
Development

No branches or pull requests

8 participants