Skip to content

Issues with concat and yao circuit #1772

@sai-lalith

Description

@sai-lalith

Describe the bug
I am trying to perform operations on a concatenated matrix, and this throws bugs for me. My initial hunch after looking at the source code and debugging is that the concat method inherited from MultiArray is outputting a MultiArray rather than a matrix. Maybe I might be wrong; I am pretty new to MPC.

To Reproduce

Code ran:
`
b = Matrix(2, 2, sbit)
b.assign_all(0)
c = Matrix (2, 2, sbit)
c.assign_all(1)
b = b.concat (c)

@for_range(len(b))
def _(i):
print_ln('%s', b[i].reveal())
`

Error:
Image

Expected behavior
The operations should just print as expected. I get the expected output if I comment out the concat part.

Also, this is the case only for yao and sbits. I tried testing with making everything sint and running with Mascot, and it worked well.

`
b = Matrix(2, 2, sint)
b.assign_all(0)
c = Matrix (2, 2, sint)
c.assign_all(1)
b = b.concat(c)

@for_range(len(b))
def _(i):
print_ln('%s', b[i].reveal())`

Image

MP-SPDZ version
Latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions