Skip to content

Commit

Permalink
repo-sync-2024-01-12T18:47:10+0800 (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
usafchn authored Jan 13, 2024
1 parent 7b8b779 commit 1de1811
Show file tree
Hide file tree
Showing 17 changed files with 213 additions and 260 deletions.
3 changes: 3 additions & 0 deletions CHANGELOGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
> - Add `[Bugfix]` prefix for bug fixes
> - Add `[API]` prefix for API changes
## [Unreleased]


## [0.5.0]

- [Feature] Add DGK cryptosystem
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")

SECRETFLOW_GIT = "https://github.com/secretflow"

YACL_COMMIT_ID = "716e72902ef5d1badd9b15159d7ff5070c8a95c4"
YACL_COMMIT_ID = "2d4adb41ed1fb0ce4c0d22c6a1cd6a72fd5b3c5e"

git_repository(
name = "yacl",
Expand Down
1 change: 1 addition & 0 deletions heu/library/algorithms/paillier_gpu/gpulib/gpupaillier.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ extern "C" {
#define DCBITS 512

typedef struct {
// maybe 256 bytes are enough
unsigned char n[DCBITS]; // n=p*q ,pub key
unsigned char n_squared[DCBITS]; // n^2
unsigned char n_plusone[DCBITS]; // g=n+1,pub key
Expand Down
245 changes: 0 additions & 245 deletions heu/library/algorithms/paillier_gpu/paillier_test.cc

This file was deleted.

56 changes: 56 additions & 0 deletions heu/library/spi/he/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
load("@yacl//bazel:yacl.bzl", "yacl_cc_library", "yacl_cc_test")

yacl_cc_library(
name = "he",
srcs = ["kit.cc"],
hdrs = ["kit.h"],
visibility = ["//visibility:public"],
deps = [
":decryptor",
":encoder",
":encryptor",
":evaluator",
],
)

yacl_cc_library(
name = "base",
hdrs = ["base.h"],
deps = [
"@yacl//yacl/utils/spi",
],
)

yacl_cc_library(
name = "encryptor",
hdrs = ["encryptor.h"],
deps = [
":base",
],
)

yacl_cc_library(
name = "decryptor",
hdrs = ["decryptor.h"],
deps = [
":base",
],
)

yacl_cc_library(
name = "evaluator",
hdrs = [
"binary_evaluator.h",
"gate_evaluator.h",
"word_evaluator.h",
],
deps = [
":base",
],
)

yacl_cc_library(
name = "encoder",
srcs = ["encoder.h"],
deps = [":base"],
)
2 changes: 1 addition & 1 deletion heu/library/spi/he/base.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Ant Group Co., Ltd.
// Copyright 2024 Ant Group Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion heu/library/spi/he/binary_evaluator.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Ant Group Co., Ltd.
// Copyright 2024 Ant Group Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion heu/library/spi/he/decryptor.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Ant Group Co., Ltd.
// Copyright 2024 Ant Group Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 1de1811

Please sign in to comment.