Home
last modified time | relevance | path

Searched refs:random (Results 1 – 25 of 47) sorted by relevance

12

/openthread-2.7.6/tests/scripts/thread-cert/
Dtest_mle.py31 import random
42 return random.getrandbits(16)
46 return random.getrandbits(1)
50 return random.getrandbits(1)
54 return random.getrandbits(1)
58 return random.getrandbits(1)
162 return random.getrandbits(4)
166 return random.getrandbits(32)
170 length = random.randint(4, 8)
171 return bytearray(random.getrandbits(8) for _ in range(length))
[all …]
Dtest_network_layer.py31 import random
40 return bytearray([random.getrandbits(8) for _ in range(16)])
44 return bytearray([random.getrandbits(8) for _ in range(8)])
48 return random.getrandbits(16)
52 return bytearray([random.getrandbits(8) for _ in range(8)])
56 return random.getrandbits(1)
60 return random.getrandbits(32)
64 return random.getrandbits(8)
68 return random.getrandbits(64)
72 count = count if count is not None else random.randint(0, 255)
[all …]
Dtest_coap.py31 import random
39 return random.getrandbits(4)
43 return random.getrandbits(4)
47 return random.getrandbits(8)
53 value = random.getrandbits(4)
63 value = random.getrandbits(4)
71 return bytearray([random.getrandbits(8) for _ in range(length)])
75 return random.getrandbits(2)
79 return random.getrandbits(2)
83 return random.getrandbits(8)
[all …]
Dtest_network_data.py32 import random
128 return random.getrandbits(16)
132 return random.getrandbits(2)
141 count = random.randint(0, 16)
151 return random.getrandbits(8)
155 return random.randint(1, 16)
162 return bytearray([random.getrandbits(8) for _ in range(int(math.ceil(prefix_length / 8)))])
166 return random.getrandbits(1)
170 return random.getrandbits(1)
174 return random.getrandbits(1)
[all …]
Dtest_common.py29 import random
38 return bytearray([random.getrandbits(8) for _ in range(8)])
42 return random.getrandbits(16)
46 return bytearray([random.getrandbits(8) for _ in range(2)])
50 return bytearray([random.getrandbits(8) for _ in range(16)])
Dtest_lowpan.py31 import random
58 return random.getrandbits(2)
62 return random.getrandbits(1)
66 return random.getrandbits(2)
70 return random.getrandbits(1)
74 return random.getrandbits(1)
78 return random.getrandbits(2)
82 return random.getrandbits(1)
86 return random.getrandbits(1)
90 return random.getrandbits(2)
[all …]
Dtest_crypto.py31 import random
51 return bytearray([random.getrandbits(8) for _ in range(8)])
55 return random.getrandbits(3)
69 return bytearray([random.getrandbits(8) for _ in range(length)])
80 return random.getrandbits(32)
84 ip_address_bytes = bytearray([random.getrandbits(8) for _ in range(16)])
89 length = length if length is not None else random.randint(0, 128)
90 return bytearray([random.getrandbits(8) for _ in range(length)])
94 return bytearray([random.getrandbits(8) for _ in range(16)])
Ddtls.py370 random, argument
378 self.random = random
386 … return (self.client_version.to_bytes() + self.random.to_bytes() + self.session_id.to_bytes() +
393 random = Random.from_bytes(data)
403 random,
433 random, argument
440 self.random = random
447 … return (self.server_version.to_bytes() + self.random.to_bytes() + self.session_id.to_bytes() +
453 random = Random.from_bytes(data)
462 random,
Dtest_ipv6.py31 import random
143 return random.randint(0, (1 << bits) - 1)
187 …body = "".join([random.choice(string.ascii_letters + string.digits + string.hexdigits) for _ in ra…
193 payload = "".join([random.choice(string.printable) for _ in range(length)])
198 return bytearray([0xfe, 0x80]) + bytearray([0x00] * 6) + bytearray([random.getrandbits(8)] * 8)
231 …seed_id = "".join([random.choice(string.ascii_letters + string.digits + string.hexdigits) for _ in…
264 s = "".join(random.choice(string.printable) for _ in range(length))
325 return any_bytes(random.randint(0, 32))
1332 unused = random.randint(1, 1 << 32)
/openthread-2.7.6/third_party/mbedtls/repo/tests/suites/
Dtest_suite_psa_crypto_init.function169 uint8_t random[10] = { 0 };
177 status = psa_generate_random( random, sizeof( random ) );
208 uint8_t random[10] = { 0 };
218 PSA_ASSERT( psa_generate_random( random, sizeof( random ) ) );
234 uint8_t random[10] = { 0 };
258 PSA_ASSERT( psa_generate_random( random, sizeof( random ) ) );
270 uint8_t random[10] = { 0 };
285 PSA_ASSERT( psa_generate_random( random, sizeof( random ) ) );
Dtest_suite_ecdh.data7 ECDH primitive random #1
11 ECDH primitive random #2
15 ECDH primitive random #3
19 ECDH primitive random #4
23 ECDH primitive random #5
Dtest_suite_ecdsa.data4 ECDSA primitive random #1
8 ECDSA primitive random #2
12 ECDSA primitive random #3
16 ECDSA primitive random #4
20 ECDSA primitive random #5
36 ECDSA write-read random #1
40 ECDSA write-read random #2
44 ECDSA write-read random #3
48 ECDSA write-read random #4
52 ECDSA write-read random #5
Dtest_suite_mpi.data958 Fill random: 0 bytes
961 Fill random: 1 byte, good
964 Fill random: 2 bytes, good, no leading zero
967 Fill random: 2 bytes, good, 1 leading zero
970 Fill random: MAX_SIZE - 7, good
973 Fill random: MAX_SIZE, good
976 Fill random: 1 byte, RNG failure
979 Fill random: 2 bytes, RNG failure after 1 byte
982 Fill random: 4 bytes, RNG failure after 3 bytes
985 Fill random: 8 bytes, RNG failure after 7 bytes
[all …]
Dtest_suite_psa_crypto_init.data13 No random without init
19 No random after deinit
Dtest_suite_mpi.function18 * chooses a random witness. The witnesses (or non-witnesses as provided by the
26 mbedtls_test_mpi_random *random = (mbedtls_test_mpi_random*) state;
28 if( random == NULL || random->data->x == NULL || buf == NULL )
31 if( random->pos + random->chunk_len > random->data->len
32 || random->chunk_len > len )
44 memcpy( buf + len - random->chunk_len, &random->data->x[random->pos],
45 random->chunk_len );
47 random->pos += random->chunk_len;
Dtest_suite_psa_crypto_slot_management.data94 Open failure: invalid identifier (random seed UID)
120 Create failure: invalid key id (random seed UID)
/openthread-2.7.6/third_party/mbedtls/repo/programs/
D.gitignore35 random/gen_entropy
36 random/gen_random_ctr_drbg
37 random/gen_random_havege
DMakefile86 random/gen_entropy$(EXEXT) \
87 random/gen_random_ctr_drbg$(EXEXT) \
88 random/gen_random_havege$(EXEXT) \
246 random/gen_entropy$(EXEXT): random/gen_entropy.c $(DEP)
248 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_entropy.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
250 random/gen_random_havege$(EXEXT): random/gen_random_havege.c $(DEP)
252 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_random_havege.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
254 random/gen_random_ctr_drbg$(EXEXT): random/gen_random_ctr_drbg.c $(DEP)
256 $(CC) $(LOCAL_CFLAGS) $(CFLAGS) random/gen_random_ctr_drbg.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
DREADME.md59 * [`random/gen_entropy.c`](random/gen_entropy.c): shows how to use the default entropy sources to g…
60 …rator to seed a cryptographic pseudorandom generator, as illustrated by `random/gen_random_ctr_drb…
62random/gen_random_ctr_drbg.c`](random/gen_random_ctr_drbg.c): shows how to use the default entropy…
64 * [`random/gen_random_havege.c`](random/gen_random_havege.c): demonstrates the HAVEGE entropy colle…
DCMakeLists.txt8 add_subdirectory(random)
/openthread-2.7.6/third_party/mbedtls/repo/docs/architecture/
Dmbed-crypto-storage-specification.md27 * [Nonvolatile random seed](#nonvolatile-random-seed-file-format-for-0.1.0) on ITS only.
31 … has a nonvolatile random seed file produced with Mbed OS 5.11.x and is upgraded to a later versio…
33 We do not make any promises regarding key storage, or regarding the nonvolatile random seed file on…
62 ### Nonvolatile random seed file format for 0.1.0
64 The nonvolatile random seed file contains a seed for the random generator. If present, it is rewrit…
74 * File 0xffffff52 (`PSA_CRYPTO_ITS_RANDOM_SEED_UID`): [nonvolatile random seed](#nonvolatile-random
104 * [Nonvolatile random seed](#nonvolatile-random-seed-file-format-for-1.0.0) on ITS only.
121 ### Nonvolatile random seed file format for 1.0.0
123 [Identical to 0.1.0](#nonvolatile-random-seed-file-format-for-0.1.0).
132 * File 0xffffff52 (`PSA_CRYPTO_ITS_RANDOM_SEED_UID`): [nonvolatile random seed](#nonvolatile-random
[all …]
/openthread-2.7.6/third_party/mbedtls/repo/docs/
Dgetting_started.md33 * [Generating a random value](#generating-a-random-value)
502 ### Generating a random value
504 Mbed Crypto can generate random data.
506 **Prerequisites to generating random data:**
509 <span class="notes">**Note:** To generate a random key, use `psa_generate_key()` instead of `psa_ge…
511 This example shows how to generate ten bytes of random data by calling `psa_generate_random()`:
514 uint8_t random[10] = { 0 };
516 printf("Generate random...\t");
526 status = psa_generate_random(random, sizeof(random));
528 printf("Failed to generate a random value\n");
[all …]
/openthread-2.7.6/src/cli/
DREADME_COAPS.md172 … Non-confirmable (default). Use "block-<block-size>" to send blocks with random payload. ("block-1…
200 … Non-confirmable (default). Use "block-<block-size>" to send blocks with random payload. ("block-1…
DREADME_COAP.md175 … Non-confirmable (default). Use "block-<block-size>" to send blocks with random payload. ("block-1…
192 … Non-confirmable (default). Use "block-<block-size>" to send blocks with random payload. ("block-1…
/openthread-2.7.6/tests/toranj/
Dwpan.py34 import random
633 random.seed(123456)
696 src_port = random.randint(49152, 65535)
703 dst_port = random.randint(49152, 65535)
708 msg = ''.join(random.choice(all_chars) for _ in range(data))

12