Home
last modified time | relevance | path

Searched refs:grp (Results 1 – 25 of 194) sorted by relevance

12345678

/third_party/mbedtls/library/
Decp.c272 int mbedtls_ecp_check_budget( const mbedtls_ecp_group *grp, in mbedtls_ecp_check_budget() argument
276 ECP_VALIDATE_RET( grp != NULL ); in mbedtls_ecp_check_budget()
282 if( grp->pbits >= 512 ) in mbedtls_ecp_check_budget()
284 else if( grp->pbits >= 384 ) in mbedtls_ecp_check_budget()
500 mbedtls_ecp_curve_type mbedtls_ecp_get_type( const mbedtls_ecp_group *grp ) in mbedtls_ecp_get_type() argument
502 if( grp->G.X.p == NULL ) in mbedtls_ecp_get_type()
505 if( grp->G.Y.p == NULL ) in mbedtls_ecp_get_type()
526 void mbedtls_ecp_group_init( mbedtls_ecp_group *grp ) in mbedtls_ecp_group_init() argument
528 ECP_VALIDATE( grp != NULL ); in mbedtls_ecp_group_init()
530 grp->id = MBEDTLS_ECP_DP_NONE; in mbedtls_ecp_group_init()
[all …]
Decjpake.c62 mbedtls_ecp_group_init( &ctx->grp ); in mbedtls_ecjpake_init()
85 mbedtls_ecp_group_free( &ctx->grp ); in mbedtls_ecjpake_free()
120 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) ); in mbedtls_ecjpake_setup()
153 ctx->grp.id == MBEDTLS_ECP_DP_NONE || in mbedtls_ecjpake_check()
167 const mbedtls_ecp_group *grp, in ecjpake_write_len_point() argument
178 ret = mbedtls_ecp_point_write_binary( grp, P, pf, in ecjpake_write_len_point()
200 const mbedtls_ecp_group *grp, in ecjpake_hash() argument
216 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, G ) ); in ecjpake_hash()
217 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, V ) ); in ecjpake_hash()
218 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); in ecjpake_hash()
[all …]
Decdsa.c174 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, ECDSA_RS_ECP, ops ) );
227 static int derive_mpi( const mbedtls_ecp_group *grp, mbedtls_mpi *x, in derive_mpi() argument
231 size_t n_size = ( grp->nbits + 7 ) / 8; in derive_mpi()
235 if( use_size * 8 > grp->nbits ) in derive_mpi()
236 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( x, use_size * 8 - grp->nbits ) ); in derive_mpi()
239 if( mbedtls_mpi_cmp_mpi( x, &grp->N ) >= 0 ) in derive_mpi()
240 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( x, x, &grp->N ) ); in derive_mpi()
252 static int ecdsa_sign_restartable( mbedtls_ecp_group *grp, in ecdsa_sign_restartable() argument
267 if( ! mbedtls_ecdsa_can_do( grp->id ) || grp->N.p == NULL ) in ecdsa_sign_restartable()
271 if( mbedtls_mpi_cmp_int( d, 1 ) < 0 || mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 ) in ecdsa_sign_restartable()
[all …]
Decp_internal_alt.h75 unsigned char mbedtls_internal_ecp_grp_capable( const mbedtls_ecp_group *grp );
92 int mbedtls_internal_ecp_init( const mbedtls_ecp_group *grp );
100 void mbedtls_internal_ecp_free( const mbedtls_ecp_group *grp );
120 int mbedtls_internal_ecp_randomize_jac( const mbedtls_ecp_group *grp,
165 int mbedtls_internal_ecp_add_mixed( const mbedtls_ecp_group *grp,
190 int mbedtls_internal_ecp_double_jac( const mbedtls_ecp_group *grp,
220 int mbedtls_internal_ecp_normalize_jac_many( const mbedtls_ecp_group *grp,
238 int mbedtls_internal_ecp_normalize_jac( const mbedtls_ecp_group *grp,
247 int mbedtls_internal_ecp_double_add_mxz( const mbedtls_ecp_group *grp,
268 int mbedtls_internal_ecp_randomize_mxz( const mbedtls_ecp_group *grp,
[all …]
Decdh.c53 return( ctx->grp.id ); in mbedtls_ecdh_grp_id()
74 static int ecdh_gen_public_restartable( mbedtls_ecp_group *grp, in ecdh_gen_public_restartable() argument
86 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, d, f_rng, p_rng ) ); in ecdh_gen_public_restartable()
88 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable()
98 int mbedtls_ecdh_gen_public( mbedtls_ecp_group *grp, mbedtls_mpi *d, mbedtls_ecp_point *Q, in mbedtls_ecdh_gen_public() argument
102 ECDH_VALIDATE_RET( grp != NULL ); in mbedtls_ecdh_gen_public()
106 return( ecdh_gen_public_restartable( grp, d, Q, f_rng, p_rng, NULL ) ); in mbedtls_ecdh_gen_public()
114 static int ecdh_compute_shared_restartable( mbedtls_ecp_group *grp, in ecdh_compute_shared_restartable() argument
126 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &P, d, Q, in ecdh_compute_shared_restartable()
146 int mbedtls_ecdh_compute_shared( mbedtls_ecp_group *grp, mbedtls_mpi *z, in mbedtls_ecdh_compute_shared() argument
[all …]
Dpsa_crypto_ecp.c115 mbedtls_ecp_group_load( &ecp->grp, grp_id ) ); in mbedtls_psa_ecp_load_representation()
124 mbedtls_ecp_point_read_binary( &ecp->grp, &ecp->Q, in mbedtls_psa_ecp_load_representation()
132 mbedtls_ecp_check_pubkey( &ecp->grp, &ecp->Q ) ); in mbedtls_psa_ecp_load_representation()
140 mbedtls_ecp_read_key( ecp->grp.id, in mbedtls_psa_ecp_load_representation()
187 *bits = ecp->grp.nbits + 1; in mbedtls_psa_ecp_import_key()
189 *bits = ecp->grp.nbits; in mbedtls_psa_ecp_import_key()
222 mbedtls_ecp_mul( &ecp->grp, &ecp->Q, &ecp->d, &ecp->grp.G, in mbedtls_psa_ecp_export_key()
230 mbedtls_ecp_point_write_binary( &ecp->grp, &ecp->Q, in mbedtls_psa_ecp_export_key()
242 if( data_size < PSA_BITS_TO_BYTES( ecp->grp.nbits ) ) in mbedtls_psa_ecp_export_key()
248 PSA_BITS_TO_BYTES( ecp->grp.nbits ) ) ); in mbedtls_psa_ecp_export_key()
[all …]
/third_party/mbedtls/tests/suites/
Dtest_suite_ecp.function29 mbedtls_ecp_group grp;
36 mbedtls_ecp_point_write_binary( &grp, &P,
41 mbedtls_ecp_tls_write_point( &grp, &P,
77 mbedtls_ecp_group grp;
80 mbedtls_ecp_group_init( &grp );
83 TEST_ASSERT( mbedtls_ecp_group_load( &grp, grp_id ) == 0 );
89 TEST_ASSERT( mbedtls_ecp_check_pubkey( &grp, &P ) == ret );
92 mbedtls_ecp_group_free( &grp );
122 mbedtls_ecp_group grp;
130 mbedtls_ecp_group_init( &grp );
[all …]
Dtest_suite_ecdh.function8 TEST_ASSERT( mbedtls_ecp_group_load( &ecp->grp, grp_id ) == 0 );
9 TEST_ASSERT( mbedtls_ecp_point_read_binary( &ecp->grp,
13 TEST_ASSERT( mbedtls_ecp_check_pubkey( &ecp->grp,
28 TEST_ASSERT( mbedtls_ecp_check_privkey( &ecp->grp, &ecp->d ) == 0 );
30 TEST_ASSERT( mbedtls_ecp_mul( &ecp->grp, &ecp->Q, &ecp->d,
31 &ecp->grp.G,
65 mbedtls_ecp_group grp;
70 mbedtls_ecp_group_init( &grp );
76 TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 );
78 TEST_ASSERT( mbedtls_ecdh_gen_public( &grp, &dA, &qA,
[all …]
Dtest_suite_ecdsa.function13 mbedtls_ecp_group grp;
19 mbedtls_ecp_group_init( &grp );
25 TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 );
26 TEST_ASSERT( mbedtls_ecp_gen_keypair( &grp, &d, &Q,
30 TEST_ASSERT( mbedtls_ecdsa_sign( &grp, &r, &s, &d, buf, sizeof( buf ),
33 TEST_ASSERT( mbedtls_ecdsa_verify( &grp, buf, sizeof( buf ), &Q, &r, &s ) == 0 );
36 mbedtls_ecp_group_free( &grp );
45 mbedtls_ecp_group grp;
51 mbedtls_ecp_group_init( &grp );
60 TEST_ASSERT( mbedtls_ecp_group_load( &grp, id ) == 0 );
[all …]
/third_party/boost/boost/process/detail/posix/
Dgroup_handle.hpp18 pid_t grp = -1; member
21 handle_t handle() const { return grp; } in handle()
24 grp(h) in group_handle()
32 group_handle(group_handle && c) : grp(c.grp) in group_handle()
34 c.grp = -1; in group_handle()
39 grp = c.grp; in operator =()
40 c.grp = -1; in operator =()
46 if (::setpgid(proc, grp)) in add()
51 if (::setpgid(proc, grp)) in add()
57 return ::getpgid(proc) == grp; in has()
[all …]
Dgroup_ref.hpp23 group_handle & grp; member
27 grp(g) in group_ref()
33 if (grp.grp == -1) in on_exec_setup()
36 ::setpgid(0, grp.grp); in on_exec_setup()
42 if (grp.grp == -1) in on_success()
43 grp.grp = exec.pid; in on_success()
/third_party/toybox/toys/posix/
Did.c89 struct group *grp; in do_id() local
107 grp = xgetgrgid(i ? gid : egid); in do_id()
108 if (flags & FLAG_g) s_or_u(grp->gr_name, grp->gr_gid, 1); in do_id()
112 showid(" gid=", grp->gr_gid, grp->gr_name); in do_id()
120 grp = xgetgrgid(egid); in do_id()
121 showid(" egid=", grp->gr_gid, grp->gr_name); in do_id()
125 showid(" groups=", grp->gr_gid, grp->gr_name); in do_id()
139 if (!(grp = getgrgid(groups[i]))) perror_msg(0); in do_id()
140 else if (toys.optflags&FLAG_G) s_or_u(grp->gr_name, grp->gr_gid, 0); in do_id()
141 else if (grp->gr_gid != egid) showid("", grp->gr_gid, grp->gr_name); in do_id()
/third_party/musl/libc-test/src/functionalext/supplement/passwd/
Dgetgrnam_r.c32 struct group *grp; in getgrnam_r_0100() local
36 int result = getgrnam_r(group_name, &grp_storage, buf, sizeof(buf), &grp); in getgrnam_r_0100()
44 if (!grp) { in getgrnam_r_0100()
47 if (strcmp(group_name, grp->gr_name)) { in getgrnam_r_0100()
48 t_error("%s grp->gr_name is %s\n", __func__, grp->gr_name); in getgrnam_r_0100()
50 if (gid != grp->gr_gid) { in getgrnam_r_0100()
51 t_error("%s gr_gid is %d\n", __func__, grp->gr_gid); in getgrnam_r_0100()
53 if (!grp->gr_mem) { in getgrnam_r_0100()
66 struct group *grp; in getgrnam_r_0200() local
69 int result = getgrnam_r("invalid_name", &grp_storage, buf, sizeof(buf), &grp); in getgrnam_r_0200()
Dgetgrgid_r.c32 struct group *grp; in getgrgid_r_0100() local
36 int result = getgrgid_r(gid, &grp_storage, buf, sizeof(buf), &grp); in getgrgid_r_0100()
44 if (!grp) { in getgrgid_r_0100()
47 if (strcmp(group_name, grp->gr_name)) { in getgrgid_r_0100()
48 t_error("%s grp->gr_name is %s\n", __func__, grp->gr_name); in getgrgid_r_0100()
50 if (gid != grp->gr_gid) { in getgrgid_r_0100()
51 t_error("%s gr_gid is %d\n", __func__, grp->gr_gid); in getgrgid_r_0100()
53 if (!grp->gr_mem) { in getgrgid_r_0100()
66 struct group *grp; in getgrgid_r_0200() local
69 int result = getgrgid_r(-1, &grp_storage, buf, sizeof(buf), &grp); in getgrgid_r_0200()
Dgetgrnam.c33 struct group *grp = getgrnam(group_name); in getgrnam_0100() local
37 if (!grp) { in getgrnam_0100()
40 if (strcmp(group_name, grp->gr_name)) { in getgrnam_0100()
41 t_error("%s failed, grp->gr_name is %s\n", __func__, grp->gr_name); in getgrnam_0100()
43 if (grp->gr_gid != gid) { in getgrnam_0100()
44 t_error("%s failed, grp->gr_gid is %d\n", __func__, grp->gr_gid); in getgrnam_0100()
46 if (grp->gr_mem == NULL) { in getgrnam_0100()
Dgetgrgid.c33 struct group *grp = getgrgid(gid); in getgrgid_0100() local
37 if (!grp) { in getgrgid_0100()
40 if (strcmp(group_name, grp->gr_name)) { in getgrgid_0100()
41 t_error("%s failed, grp->gr_name is %s\n", __func__, grp->gr_name); in getgrgid_0100()
43 if (grp->gr_gid != gid) { in getgrgid_0100()
44 t_error("%s failed, grp->gr_gid is %d\n", __func__, grp->gr_gid); in getgrgid_0100()
46 if (grp->gr_mem == NULL) { in getgrgid_0100()
/third_party/mbedtls/include/mbedtls/
Decp.h395 int mbedtls_ecp_check_budget( const mbedtls_ecp_group *grp,
401 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
423 mbedtls_ecp_group MBEDTLS_PRIVATE(grp); /*!< Elliptic curve and base point */
512 mbedtls_ecp_curve_type mbedtls_ecp_get_type( const mbedtls_ecp_group *grp );
593 void mbedtls_ecp_group_init( mbedtls_ecp_group *grp );
616 void mbedtls_ecp_group_free( mbedtls_ecp_group *grp );
750 int mbedtls_ecp_point_write_binary( const mbedtls_ecp_group *grp,
777 int mbedtls_ecp_point_read_binary( const mbedtls_ecp_group *grp,
799 int mbedtls_ecp_tls_read_point( const mbedtls_ecp_group *grp,
825 int mbedtls_ecp_tls_write_point( const mbedtls_ecp_group *grp,
[all …]
/third_party/python/Lib/test/
Dtest_grp.py7 grp = import_helper.import_module('grp') variable
25 entries = grp.getgrall()
31 entries = grp.getgrall()
36 e2 = grp.getgrgid(e.gr_gid)
43 e2 = grp.getgrnam(name)
51 self.assertRaises(TypeError, grp.getgrgid)
52 self.assertRaises(TypeError, grp.getgrnam)
53 self.assertRaises(TypeError, grp.getgrall, 42)
55 self.assertRaises(ValueError, grp.getgrnam, 'a\x00b')
60 for (n, p, g, mem) in grp.getgrall():
[all …]
/third_party/toybox/toys/pending/
Dgroupdel.c25 struct group *grp = xgetgrnam(toys.optargs[toys.optc-1]); in groupdel_main() local
34 if (grp->gr_mem) for (i = 0; grp->gr_mem[i]; i++) { in groupdel_main()
35 if (!found && !strcmp(*toys.optargs, grp->gr_mem[i])) found++; in groupdel_main()
36 else len += strlen(grp->gr_mem[i]) + 1; in groupdel_main()
42 for (i = 0; grp->gr_mem[i]; ) { in groupdel_main()
44 s = stpcpy(s, grp->gr_mem[i]); in groupdel_main()
52 if (pw->pw_gid == grp->gr_gid) break; in groupdel_main()
58 update_password("/etc/group", grp->gr_name, entry); in groupdel_main()
59 update_password("/etc/gshadow", grp->gr_name, entry); in groupdel_main()
Dgroupadd.c62 struct group *grp = NULL; in groupadd_main() local
71 if (!(grp = getgrnam(toys.optargs[1]))) in groupadd_main()
73 if (!grp->gr_mem) entry = xmprintf("%s", *toys.optargs); in groupadd_main()
77 for (i = 0; grp->gr_mem[i]; i++) in groupadd_main()
78 if (!strcmp(grp->gr_mem[i], *toys.optargs)) return; in groupadd_main()
81 for (i=0; grp->gr_mem[i]; i++) { in groupadd_main()
82 entry = xrealloc(entry, strlen(entry) + strlen(grp->gr_mem[i]) + 2); in groupadd_main()
83 strcat(entry, grp->gr_mem[i]); in groupadd_main()
89 update_password(GROUP_PATH, grp->gr_name, entry); in groupadd_main()
90 update_password(SECURE_GROUP_PATH, grp->gr_name, entry); in groupadd_main()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_common/
Deap_pwd_common.c91 EAP_PWD_group *grp; in get_eap_pwd_group() local
97 grp = os_zalloc(sizeof(EAP_PWD_group)); in get_eap_pwd_group()
98 if (!grp) in get_eap_pwd_group()
100 grp->group = crypto_ec_init(num); in get_eap_pwd_group()
101 if (!grp->group) { in get_eap_pwd_group()
103 os_free(grp); in get_eap_pwd_group()
107 grp->group_num = num; in get_eap_pwd_group()
110 return grp; in get_eap_pwd_group()
118 int compute_password_element(EAP_PWD_group *grp, u16 num, in compute_password_element() argument
145 if (grp->pwe) in compute_password_element()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_common/
Deap_pwd_common.c91 EAP_PWD_group *grp; in get_eap_pwd_group() local
97 grp = os_zalloc(sizeof(EAP_PWD_group)); in get_eap_pwd_group()
98 if (!grp) in get_eap_pwd_group()
100 grp->group = crypto_ec_init(num); in get_eap_pwd_group()
101 if (!grp->group) { in get_eap_pwd_group()
103 os_free(grp); in get_eap_pwd_group()
107 grp->group_num = num; in get_eap_pwd_group()
110 return grp; in get_eap_pwd_group()
118 int compute_password_element(EAP_PWD_group *grp, u16 num, in compute_password_element() argument
145 if (grp->pwe) in compute_password_element()
[all …]
/third_party/libnl/lib/genl/
Dfamily.c52 struct genl_family_grp *grp, *t_grp; in family_free_data() local
62 nl_list_for_each_entry_safe(grp, t_grp, &family->gf_mc_grps, list) { in family_free_data()
63 nl_list_del(&grp->list); in family_free_data()
64 free(grp); in family_free_data()
74 struct genl_family_grp *grp; in family_clone() local
83 nl_list_for_each_entry(grp, &src->gf_mc_grps, list) { in family_clone()
84 err = genl_family_add_grp(dst, grp->id, grp->name); in family_clone()
115 struct genl_family_grp *grp; in family_dump_details() local
142 nl_list_for_each_entry(grp, &family->gf_mc_grps, list) { in family_dump_details()
143 nl_dump_line(p, " grp %s (0x%02x)\n", grp->name, grp->id); in family_dump_details()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/
Deap_server_pwd.c35 EAP_PWD_group *grp; member
157 if (data->grp) { in eap_pwd_reset()
158 crypto_ec_deinit(data->grp->group); in eap_pwd_reset()
159 crypto_ec_point_deinit(data->grp->pwe, 1); in eap_pwd_reset()
160 os_free(data->grp); in eap_pwd_reset()
250 prime_len = crypto_ec_prime_len(data->grp->group); in eap_pwd_build_commit_req()
251 order_len = crypto_ec_order_len(data->grp->group); in eap_pwd_build_commit_req()
254 data->my_element = crypto_ec_point_init(data->grp->group); in eap_pwd_build_commit_req()
264 if (eap_pwd_get_rand_mask(data->grp, data->private_value, mask, in eap_pwd_build_commit_req()
268 if (crypto_ec_point_mul(data->grp->group, data->grp->pwe, mask, in eap_pwd_build_commit_req()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_server/
Deap_server_pwd.c35 EAP_PWD_group *grp; member
157 if (data->grp) { in eap_pwd_reset()
158 crypto_ec_deinit(data->grp->group); in eap_pwd_reset()
159 crypto_ec_point_deinit(data->grp->pwe, 1); in eap_pwd_reset()
160 os_free(data->grp); in eap_pwd_reset()
250 prime_len = crypto_ec_prime_len(data->grp->group); in eap_pwd_build_commit_req()
251 order_len = crypto_ec_order_len(data->grp->group); in eap_pwd_build_commit_req()
254 data->my_element = crypto_ec_point_init(data->grp->group); in eap_pwd_build_commit_req()
264 if (eap_pwd_get_rand_mask(data->grp, data->private_value, mask, in eap_pwd_build_commit_req()
268 if (crypto_ec_point_mul(data->grp->group, data->grp->pwe, mask, in eap_pwd_build_commit_req()
[all …]

12345678