aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Summermatter <elias.summermatter@seccom.ch>2021-06-15 10:32:54 +0200
committerElias Summermatter <elias.summermatter@seccom.ch>2021-06-15 10:32:54 +0200
commitec5663ea14762c53bbad474b93858be9e4f00f24 (patch)
tree9d4f43511496cf9e94b3733d2ae985ab52e42071
parent6b5f616647574ad7b8a98125490b0aea61170088 (diff)
downloadlsd0003-ec5663ea14762c53bbad474b93858be9e4f00f24.tar.gz
lsd0003-ec5663ea14762c53bbad474b93858be9e4f00f24.zip
Fixed some more
-rw-r--r--draft-summermatter-set-union.xml16
1 files changed, 8 insertions, 8 deletions
diff --git a/draft-summermatter-set-union.xml b/draft-summermatter-set-union.xml
index a344788..c9c1141 100644
--- a/draft-summermatter-set-union.xml
+++ b/draft-summermatter-set-union.xml
@@ -2318,7 +2318,7 @@ FUNCTION unpack_counter(ibf, offset, count, cbl, pd)
2318 RETURN 2318 RETURN
2319 END IF 2319 END IF
2320 2320
2321 IF (store_bits + bit_to_pack_left) >= cbl 2321 IF store_bits + bit_to_pack_left >= cbl
2322 bit_use = cbl - store_bits 2322 bit_use = cbl - store_bits
2323 2323
2324 IF store_bits > 0 2324 IF store_bits > 0
@@ -2461,13 +2461,13 @@ END FUNCTION
2461# Output: 2461# Output:
2462# returns TRUE if parameters in byzantine bounds otherwise returns FALSE 2462# returns TRUE if parameters in byzantine bounds otherwise returns FALSE
2463FUNCTION check_byzantine_bounds (rec,rsd,lec,lsd) 2463FUNCTION check_byzantine_bounds (rec,rsd,lec,lsd)
2464 IF (rec + rsd > UPPER_BOUND) 2464 IF rec + rsd > UPPER_BOUND
2465 RETURN FALSE 2465 RETURN FALSE
2466 IF END 2466 IF END
2467 IF (lec + lsd > UPPER_BOUND) 2467 IF lec + lsd > UPPER_BOUND
2468 RETURN FALSE 2468 RETURN FALSE
2469 IF END 2469 IF END
2470 IF (rec < LOWER_BOUND) 2470 IF rec < LOWER_BOUND
2471 RETURN FALSE 2471 RETURN FALSE
2472 IF END 2472 IF END
2473 RETURN TRUE 2473 RETURN TRUE
@@ -2758,16 +2758,16 @@ FUNCTION full_sync_plausibility_check (state,rs,lis,rd,rf)
2758 2758
2759 # Make sure that no element is received double when 2759 # Make sure that no element is received double when
2760 # all elements already are transmitted to the oder side. 2760 # all elements already are transmitted to the oder side.
2761 IF ( (FULL_SENDING == state) && (rd > 0) ) 2761 IF FULL_SENDING == state AND rd > 0
2762 RETURN FALSE 2762 RETURN FALSE
2763 END IF 2763 END IF
2764 2764
2765 # Probabilistic algorithm to check for plausible 2765 # Probabilistic algorithm to check for plausible
2766 # element distribution 2766 # element distribution
2767 IF (FULL_RECEIVING == state) 2767 IF FULL_RECEIVING == state
2768 2768
2769 # Prevent division by 0 2769 # Prevent division by 0
2770 IF (0 <= rs) 2770 IF 0 <= rs
2771 rs = 1 2771 rs = 1
2772 END IF 2772 END IF
2773 2773
@@ -2775,7 +2775,7 @@ FUNCTION full_sync_plausibility_check (state,rs,lis,rd,rf)
2775 base = 1 - (rs / (lis + rs)) 2775 base = 1 - (rs / (lis + rs))
2776 exponent = rd - rf * lis / rs 2776 exponent = rd - rf * lis / rs
2777 value = exponent * (LOG2(base)/LOG2(2)) 2777 value = exponent * (LOG2(base)/LOG2(2))
2778 IF ((value < security_level_lb) || (value > SECURITY_LEVEL) 2778 IF value < security_level_lb OR value > SECURITY_LEVEL
2779 RETURN FALSE 2779 RETURN FALSE
2780 END IF 2780 END IF
2781 END IF 2781 END IF