Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…E.jl into new-version
  • Loading branch information
ArseniyKholod committed Jun 20, 2024
2 parents fa50c62 + 63d06de commit 28ed27b
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Downgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
with:
version: ${{ matrix.version }}
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
- uses: julia-actions/cache@v1
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-downgrade-compat@v1
with:
skip: Pkg,TOML,UUIDs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
- name: Checkout Actions Repository
uses: actions/checkout@v4
- name: Check spelling
uses: crate-ci/typos@v1.19.0
uses: crate-ci/typos@v1.22.7
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
version: ${{ matrix.version }}
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)'
- uses: julia-actions/cache@v1
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand Down
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"upload_type": "software",
"creators": [
{
"affiliation": "Applied and Computational Mathematics, RWTH Aachen University, Germany",
"affiliation": "High-Performance Scientific Computing, University of Augsburg, Germany",
"name": "Schlottke-Lakemper, Michael",
"orcid": "0000-0002-3195-2536"
}
Expand Down
2 changes: 1 addition & 1 deletion CITATION.bib
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ @misc{schlottkelakemper2024openfhejl
title={{O}pen{FHE}.jl: {F}ully homomorphic encryption in {J}ulia using {O}pen{FHE}},
author={Schlottke-Lakemper, Michael},
year={2024},
howpublished={\url{https://github.com/sloede/OpenFHE.jl}},
howpublished={\url{https://github.com/hpsc-lab/OpenFHE.jl}},
doi={10.5281/zenodo.10460452}
}

4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
openfhe_julia_jll = "e5e97983-1b8c-50fe-92b7-0e05c8c202e2"

[compat]
CxxWrap = "0.15"
CxxWrap = "0.16"
Preferences = "1.4"
UUIDs = "1"
openfhe_julia_jll = "0.3.0"
openfhe_julia_jll = "0.3.1"
julia = "1.8"
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# OpenFHE.jl

[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://openfhe-jl.lakemper.eu/stable)
[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://openfhe-jl.lakemper.eu/dev)
[![Build Status](https://github.com/sloede/OpenFHE.jl/workflows/CI/badge.svg)](https://github.com/sloede/OpenFHE.jl/actions?query=workflow%3ACI)
[![Coveralls](https://coveralls.io/repos/github/sloede/OpenFHE.jl/badge.svg)](https://coveralls.io/github/sloede/OpenFHE.jl)
[![Codecov](https://codecov.io/gh/sloede/OpenFHE.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/sloede/OpenFHE.jl)
[![Docs-stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://hpsc-lab.github.io/OpenFHE.jl/stable)
[![Docs-dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://hpsc-lab.github.io/OpenFHE.jl/dev)
[![Build Status](https://github.com/hpsc-lab/OpenFHE.jl/workflows/CI/badge.svg)](https://github.com/hpsc-lab/OpenFHE.jl/actions?query=workflow%3ACI)
[![Coveralls](https://coveralls.io/repos/github/hpsc-lab/OpenFHE.jl/badge.svg)](https://coveralls.io/github/hpsc-lab/OpenFHE.jl)
[![Codecov](https://codecov.io/gh/hpsc-lab/OpenFHE.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/hpsc-lab/OpenFHE.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/license/mit/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10460452.svg)](https://doi.org/10.5281/zenodo.10460452)

OpenFHE.jl is a Julia wrapper package for
[OpenFHE](https://github.com/openfheorg/openfhe-development), a C++ library for fully
homomorphic encryption. The C++ functionality is exposed in native Julia via the
[CxxWrap.jl](https://github.com/JuliaInterop/CxxWrap.jl) package, using
[OpenFHE-julia](https://github.com/sloede/openfhe-julia) as its backend.
[OpenFHE-julia](https://github.com/hpsc-lab/openfhe-julia) as its backend.

*Note: This package is work in progress and not all capabilities of OpenFHE have been
translated to Julia yet. Community contributions are very welcome!*
Expand All @@ -23,7 +23,7 @@ translated to Julia yet. Community contributions are very welcome!*
### Prerequisites
If you have not yet installed Julia, please [follow the instructions for your
operating system](https://julialang.org/downloads/platform/).
[OpenFHE.jl](https://github.com/sloede/OpenFHE.jl) works with Julia v1.8
[OpenFHE.jl](https://github.com/hpsc-lab/OpenFHE.jl) works with Julia v1.8
and later on Linux and macOS platforms, and with Julia v1.9 or later on Windows platforms.

### Installation
Expand All @@ -32,15 +32,15 @@ following commands in the Julia REPL:
```julia
julia> import Pkg; Pkg.add("OpenFHE")
```
Internally, OpenFHE.jl relies on [OpenFHE-julia](https://github.com/sloede/openfhe-julia) to
Internally, OpenFHE.jl relies on [OpenFHE-julia](https://github.com/hpsc-lab/openfhe-julia) to
provide bindings for the C++ library
[OpenFHE](https://github.com/openfheorg/openfhe-development). Precompiled binares for
OpenFHE-julia and OpenFHE are automatically for your platform when you install OpenFHE.jl,
thus there is no need to compile anything manually.

### Usage
The easiest way to get started is to run one of the examples from the
[`examples`](https://github.com/sloede/OpenFHE.jl/tree/main/examples) directory by
[`examples`](https://github.com/hpsc-lab/OpenFHE.jl/tree/main/examples) directory by
`include`ing them in Julia, e.g.,
```julia
julia> using OpenFHE
Expand Down Expand Up @@ -72,7 +72,7 @@ x1 rotate by -2 = (4, 5, 0.25, 0.5, 0.75, 1, 2, 3, ... ); Estimated precision:
```

### Using a custom OpenFHE-julia library
By default, OpenFHE.jl uses the [OpenFHE-julia](https://github.com/sloede/openfhe-julia)
By default, OpenFHE.jl uses the [OpenFHE-julia](https://github.com/hpsc-lab/openfhe-julia)
library provided by the openfhe\_julia\_jll.jl package, which is automatically obtained when
installing OpenFHE.jl. Someimtes, however, it might be beneficial to instead use a
system-provided OpenFHE-julia library, e.g., for development or performance purposes. You
Expand Down Expand Up @@ -137,16 +137,15 @@ If you use OpenFHE.jl in your own research, please cite this repository as follo
title={{O}pen{FHE}.jl: {F}ully homomorphic encryption in {J}ulia using {O}pen{FHE}},
author={Schlottke-Lakemper, Michael},
year={2024},
howpublished={\url{https://github.com/sloede/OpenFHE.jl}},
howpublished={\url{https://github.com/hpsc-lab/OpenFHE.jl}},
doi={10.5281/zenodo.10460452}
}
```
## Authors
OpenFHE.jl was initiated by [Michael Schlottke-Lakemper](https://lakemper.eu) (RWTH
Aachen University/High-Performance Computing Center Stuttgart (HLRS), Germany), who is also
its principal maintainer.
OpenFHE.jl was initiated by [Michael Schlottke-Lakemper](https://www.uni-augsburg.de/fakultaet/mntf/math/prof/hpsc)
(University of Augsburg, Germany), who is also its principal maintainer.
Further contributions to OpenFHE.jl have been made by the following people:
* [Arseniy Kholod](https://www.github.com/ArseniyKholod) (RWTH Aachen University, Germany)
Expand All @@ -159,9 +158,9 @@ the BSD 2-Clause license.
Contributions by the community are very welcome! A good start would be to compare the
`examples` folder in OpenFHE.jl
([link](https://github.com/sloede/OpenFHE.jl/tree/main/examples))
([link](https://github.com/hpsc-lab/OpenFHE.jl/tree/main/examples))
and in OpenFHE
([link](https://github.com/openfheorg/openfhe-development/tree/main/src/pke/examples)) and to
port a missing example file to OpenFHE.jl. In case some OpenFHE functionality is not yet
exposed by [OpenFHE-julia](https://github.com/sloede/openfhe-julia), it would have to be
exposed by [OpenFHE-julia](https://github.com/hpsc-lab/openfhe-julia), it would have to be
added there first.
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ open(joinpath(@__DIR__, "src", "index.md"), "w") do io
# Point to source file
println(io, """
```@meta
EditURL = "https://github.com/sloede/OpenFHE.jl/blob/main/README.md"
EditURL = "https://github.com/hpsc-lab/OpenFHE.jl/blob/main/README.md"
```
""")
# Write the modified contents
Expand All @@ -33,7 +33,7 @@ open(joinpath(@__DIR__, "src", "license.md"), "w") do io
# Point to source file
println(io, """
```@meta
EditURL = "https://github.com/sloede/OpenFHE/blob/main/LICENSE.md"
EditURL = "https://github.com/hpsc-lab/OpenFHE/blob/main/LICENSE.md"
```
""")
# Write the modified contents
Expand All @@ -55,7 +55,7 @@ makedocs(
# Disable pretty URLs during manual testing
prettyurls = get(ENV, "CI", nothing) == "true",
# Set canonical URL to GitHub pages URL
canonical = "https://openfhe-jl.lakemper.eu/stable"
canonical = "https://hpsc-lab.github.io/OpenFHE.jl/stable"
),
# Explicitly specify documentation structure
pages = [
Expand All @@ -70,7 +70,7 @@ makedocs(


deploydocs(;
repo = "github.com/sloede/OpenFHE.jl",
repo = "github.com/hpsc-lab/OpenFHE.jl",
devbranch = "main",
push_preview = true
)
8 changes: 4 additions & 4 deletions docs/src/release-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ To create a new release for OpenFHE.jl, perform the following steps:
1) Make sure that all PRs and changes that you want to go into the release are merged to
`main` and that the latest commit on `main` has passed all CI tests.
2) Determine the currently released version of OpenFHE.jl, e.g., on the
[release page](https://github.com/sloede/OpenFHE.jl/releases). For this manual,
[release page](https://github.com/hpsc-lab/OpenFHE.jl/releases). For this manual,
we will assume that the latest release was `v0.2.3`.
3) Decide on the next version number. We follow [semantic versioning](https://semver.org/),
thus each version is of the form `vX.Y.Z` where `X` is the major version, `Y` the minor
Expand All @@ -17,20 +17,20 @@ To create a new release for OpenFHE.jl, perform the following steps:
version is kept as-is and the *patch* version is increased by one. In our example, the
new version should thus be `v0.2.4`.
4) Edit the `version` string in the
[`Project.toml`](https://github.com/sloede/OpenFHE.jl/blob/main/Project.toml)
[`Project.toml`](https://github.com/hpsc-lab/OpenFHE.jl/blob/main/Project.toml)
and set it to the new version. Push/merge this change to `main`.
5) Go to GitHub and add a comment to the commit that you would like to become the new
release (typically this will be the commit where you just updated the version). You can
comment on a commit by going to the
[commit overview](https://github.com/sloede/OpenFHE.jl/commits/main/) and clicking
[commit overview](https://github.com/hpsc-lab/OpenFHE.jl/commits/main/) and clicking
on the title of the commit. The comment should contain the following text:
```
@JuliaRegistrator register
```
6) Wait for the magic to happen! Specifically, JuliaRegistrator will create a new PR to the
Julia registry with the new release information. After a grace period of ~15 minutes,
this PR will be merged automatically. A short while after,
[TagBot](https://github.com/sloede/OpenFHE.jl/blob/main/.github/workflows/TagBot.yml)
[TagBot](https://github.com/hpsc-lab/OpenFHE.jl/blob/main/.github/workflows/TagBot.yml)
will create a new release of OpenFHE.jl in our GitHub repository.
7) Once the new release has been created, the new version can be obtained through the Julia
package manager as usual.
Expand Down
16 changes: 12 additions & 4 deletions src/OpenFHE.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
module OpenFHE

using CxxWrap # need to use everything to avoid `UndefVarError`s
using Preferences: @load_preference, set_preferences!, delete_preferences!
using Preferences: @has_preference, @load_preference, set_preferences!, delete_preferences!
using UUIDs: UUID
using openfhe_julia_jll: libopenfhe_julia


# Load library path from preferences and wrap OpenFHE module
const libopenfhe_julia_path = @load_preference("libopenfhe_julia", libopenfhe_julia)
# Load library path from preferences or JLL package and wrap OpenFHE module
# Note: We hide loading the JLL package behind the preferences check since otherwise
# we will not be able to test new versions of `libopenfhe_julia` that require an
# incompatible version of `libcxxwrap_julia`
# xref: https://github.com/hpsc-lab/OpenFHE.jl/issues/46
if @has_preference("libopenfhe_julia")
const libopenfhe_julia_path = @load_preference("libopenfhe_julia")
else
using openfhe_julia_jll: libopenfhe_julia
const libopenfhe_julia_path = libopenfhe_julia
end
@wrapmodule(() -> libopenfhe_julia_path)

function __init__()
Expand Down

0 comments on commit 28ed27b

Please sign in to comment.