-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Hello, Nik-U,
I utilize go pbc wrapper to achieve a proxy re-encryption algorithm.
When I using Bytes() to transfer an element to []byte, like:
e := pairing.NewGT()
temp1 := pairing.NewZr().Set1()
temp := temp1.Neg(temp1)
C0_ := C_list[1].PowZn(C_list[1], temp)
temp2 := e.Pair(skid, C0_)
plainM := C_list[0].Mul(C_list[0], temp2)
plainM_bytes := plainM.Bytes()
return plainM_bytesI have a problem: the plainM.Bytes() return an incorrect []byte sometimes.
plainM should be [104 101 108 108 111 119 111 114 108 100], but I get [1 47 246 192 237 179 26 99 159 235 180 239 91 206 53 193 189 23 5 254 49 99 142 137 76 196 171 28 114 110 103 236 110 21 199 94 190 183 187 232 0 180 144 198 177 77 51 156 100 209 182 233 74 240 222 46 20 244 182 20 227 157 104 160 148] sometimes, which is not expected []byte.
I want to ask how can I solve this problem? Thanks.
Metadata
Metadata
Assignees
Labels
No labels