File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,10 @@ impl Group for DecafPoint {
178178
179179 loop {
180180 rng. try_fill_bytes ( bytes. as_mut ( ) ) ?;
181- if let Some ( point) = Self :: from_bytes ( & bytes) . into ( ) {
181+ if let Some ( point) = Self :: from_bytes ( & bytes)
182+ . into_option ( )
183+ . filter ( |point| point != & Self :: IDENTITY )
184+ {
182185 return Ok ( point) ;
183186 }
184187 }
Original file line number Diff line number Diff line change @@ -345,7 +345,10 @@ impl Group for EdwardsPoint {
345345
346346 loop {
347347 rng. try_fill_bytes ( bytes. as_mut ( ) ) ?;
348- if let Some ( point) = Self :: from_bytes ( & bytes) . into ( ) {
348+ if let Some ( point) = Self :: from_bytes ( & bytes)
349+ . into_option ( )
350+ . filter ( |point| point != & Self :: IDENTITY )
351+ {
349352 return Ok ( point) ;
350353 }
351354 }
You can’t perform that action at this time.
0 commit comments