nickthelegend/fhenix-skills/fhenix-encrypted-bitwise

Claude Code and agent skill by nickthelegend/fhenix-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Encrypted bitwise logic (and/or/xor/not — also valid on ebool) and shifts/rotations (shl/shr/rol/ror on euint8..128). Covers operand-type rules, masking/field-extraction patterns, and the coin-flip AND-with-1 trick.

Install

npx vskill@latest install nickthelegend/fhenix-skills/fhenix-encrypted-bitwise

SKILL.md

The same SKILL.md was published earlier as nickthelegend/fhenix-skills/fhenix-encrypted-bitwise.

Fhenix Encrypted Bitwise Operations

Overview

  • Logic (and, or, xor, not) works on ebool | euint8 | euint16 | euint32 | euint64 | euint128.
  • Shift / rotate (shl, shr, rol, ror) works on euint8…128 only.
FunctionMeaning
and / or / xorbitwise AND / OR / XOR (also on ebool)
notbitwise NOT (also on ebool)
shl / shrshift left / right
rol / rorrotate left / right
solidity
euint32 masked = FHE.and(value, FHE.asEuint32(255)); // low byte
euint32 shifted = FHE.shl(masked, 4); // << 4
ebool toggled = FHE.not(flag); // ebool also supported

Field extraction (mask + shift)

solidity
// Extract byte 2 (bits 16–23) of a packed euint32
euint32 byte2 = FHE.and(FHE.shr(packed, 16), FHE.asEuint32(0xFF));

ebool logic

and/or/xor/not accept ebool, useful for combining comparison results:

solidity
ebool eligible = FHE.and(ageOk, balanceOk);

Uniform coin flip (random bit)

ANDing a random euint8 with 1 forces it into {0,1} for a clean 50/50:

solidity
euint8 r = FHE.randomEuint8();
ebool coin = FHE.asEbool(FHE.and(r, FHE.asEuint8(1)));

Common pitfalls

  • Using shift/rotate on ebool — unsupported; logic ops only.
  • Mismatched operand widths — convert first with FHE.asEuintXX.
  • Forgetting FHE.allowThis(result) before storing.

Source docs

AI Agent Prompt

"Write a Solidity library that packs four euint8 fields into a euint32 (via shl+or) and extracts each back out (via shr+and mask), with ACL grants on the results."

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Grok Build (Cursor)
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/nickthelegend/fhenix-skills/fhenix-encrypted-bitwise/badge)](https://verified-skill.com/skills/nickthelegend/fhenix-skills/fhenix-encrypted-bitwise)

Something wrong with this skill or its page? Tell us.