Skip to content
Claudio Lucisano edited this page Sep 22, 2026 · 1 revision

FAQ & Troubleshooting

Building

ZROOT is undefined. Need to source env file: . ./env

You ran make in a shell where env was not sourced. Run . ./env from the repository root. You need to do this in every new shell, including CI steps and IDE terminals.

error while loading shared libraries: libopenabe.so (or librelic.so, libssl.so…)

The libraries are in root/lib and deps/root/lib[64], which env adds to LD_LIBRARY_PATH. Source env in the shell where you run the program. After make install to a system prefix, run sudo ldconfig.

Windows: "The code execution cannot proceed because … .dll was not found"

On Windows, DLLs are found through PATH. env adds the right folders, so start programs from an MSYS2 MinGW64 shell where you sourced it. To run them elsewhere, copy the DLLs from deps/root/bin, deps/root/lib and root/lib next to the .exe.

Which MSYS2 shell?

MINGW64. It is the only environment tested in CI.

The first build takes forever

It compiles OpenSSL and RELIC (twice: see RELIC Dual Build). This happens once; later builds reuse deps/root/. make clean wipes deps/root, so avoid it unless you need a full rebuild.

Using the library

Decryption returns false (CLI exit code 32), but I think the key should work

Check, in order:

  1. Case: attributes are case-sensitive; Doctor ≠ doctor.
  2. The right side: in CP-ABE the policy goes on encrypt and the attributes on keygen. In KP-ABE it is the other way around.
  3. Numbers: attribute lists use Floor=3, policies use Floor == 3. Check in (a-b) (exclusive) versus in {a-b} (inclusive).
  4. Bit widths: if you used #bits, use the same width on both sides.
  5. Same authority: the key and the ciphertext must come from the same master parameters (the same -p prefix in the CLI).

Does it matter which of and/AND I use?

No, both work (and or/OR). Mixed case like And is not a keyword. It is read as an attribute name, so the policy fails to parse.

Can I use multi-authority ABE?

Not yet. MA-ABE is referenced in the code but not implemented; see Known Limitations.

How do I revoke a key?

There is no built-in revocation. Use expiry dates in attributes and policies, or rotate the master parameters. See Key Management.

Is the ciphertext size proportional to the plaintext?

Mostly. ABE encrypts a random symmetric key, and the data itself is encrypted with authenticated symmetric encryption. The overhead grows with the number of attributes (CP-ABE policy leaves or KP-ABE attributes), not with the size of the data.

Are the outputs safe to store as text?

Yes. By default the crypto box returns base64 strings. Pass false as the second constructor argument to get raw bytes instead.

Is this post-quantum?

No. See Known Limitations for the security level of the curves.

Contributing

CI says my code is not formatted, but I ran clang-format

You are probably not using clang-format 18.1.8. Check with clang-format --version; see Development Setup.

I sorted the includes and now nothing compiles

The headers are order-dependent. Revert the include order; see Known Limitations.

I changed zparser.tab.cc and my change disappeared

It is generated from src/zparser.yy. Edit the grammar instead; the build regenerates the parser.

Is this the same as zeutro/openabe?

It is a fork of the original Zeutro library, updated to OpenSSL 4.0.1, RELIC 0.7.0 and C++17, with native Windows builds and CI. The crypto box API (OpenABECryptoContext, OpenPKEContext, OpenPKSIGContext) follows the original v1.0, so its examples still apply.

Clone this wiki locally