Comments (4)
Thanks for pointing this out. The way you are using ABY is correct. The problem was a bug in this function. It should work fine now. Please try out the new version and if you will face any problems, just let me know.
from aby.
Hi,
the Barrel Shifter gate works indeed as expected. Since ABY internally uses big-endian representation (C/C++ uses little-endian), PutRightBarrelShifter(<110>, <1>) = 110 << 1 = 0x6E << 1 = 220 = 0xDC. Furthermore, shifting the value 110 you would get neither 11 nor 1100 because these are decimal numbers and values are shifted bit-wise. For this purpose, I would suggest using the more intuitive hexadecimal representation, i.e., 0x6E for the decimal 110 and 0x06 for the binary 110. Another possibility is also to use the binary representation in C++17 as 0b0000'0110 which, however, has to
be first enabled in the compiler.
P.S.: to prevent confusion because of the changing endianness, I will switch left and right shift functions, so the shifting logic will be the same as in C.
Best,
Alex
from aby.
Thank you for the response. Closing the issue.
from aby.
I believe line 3144 of src/abycore/circuit/booleancircuits.cpp should be:
vector<uint32_t> res = PutBarrelLeftShifterGate(wires, n);
instead of:
vector<uint32_t> res = PutBarrelRightShifterGate(wires, n);
Also, would it be possible to give an example of a PutBarrelRightShifterGate with the new implementation? (Maybe using the same values of 110 and 1). I expect 55 to be the result but that is not the result I am seeing. I am getting "3959422976".
from aby.
Related Issues (20)
- How to get the sign bit of a float number?
- Remote connect timeout!
- PutFPGate
- S_SPLUT HOT 1
- "Aborted" message after running psi_2D_CH_test. HOT 1
- Question about ABY OTs for boolean multiplication triples
- Dose ABY support half gate?
- cmake_constants.h is not found HOT 3
- the PutINVGate is not work.
- How to use it as remote MPC for multi-side usage? HOT 4
- cross network communication settings
- Problems Building for Android HOT 1
- make error HOT 1
- Unstable result from innerproduct_test
- Strange behavior after using B2A and A2B gate
- How to use this library with CMake? HOT 2
- OTExtension was not found: add OTExtension subdirectory HOT 2
- PYTHON FIXEDPOINT SUPPORT
- Example test cmake warning
- cmake error with relic HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aby.