Home
last modified time | relevance | path

Searched refs:xSize (Results 1 – 25 of 39) sorted by relevance

12

/ohos5.0/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
H A Dhks_mbedtls_ecc.c78 if ((keyMaterial->xSize > maxKeyByteLen) || in EccKeyMaterialXyzSizeCheck()
81 … "zSize = 0x%" LOG_PUBLIC "X", keyMaterial->xSize, keyMaterial->ySize, keyMaterial->zSize); in EccKeyMaterialXyzSizeCheck()
121 … ret = mbedtls_mpi_read_binary(&(pub->MBEDTLS_PRIVATE(X)), key->data + offset, keyMaterial->xSize); in HksEccKeyMaterialToPub()
127 offset = offset + keyMaterial->xSize; in HksEccKeyMaterialToPub()
148 uint32_t offset = sizeof(*keyMaterial) + keyMaterial->xSize + keyMaterial->ySize; in HksEccKeyMaterialToPri()
174 keyMaterial->xSize = keyByteLen; in EccSaveKeyMaterial()
182 keyMaterial->xSize); in EccSaveKeyMaterial()
188 offset = offset + keyMaterial->xSize; in EccSaveKeyMaterial()
256 if ((keyMaterial->xSize == 0) || (keyMaterial->ySize == 0)) { in GetEccPubKeyCheckParams()
261 if (keyOut->size < (sizeof(struct KeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize)) { in GetEccPubKeyCheckParams()
[all …]
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
H A Dopenssl_ecc_helper.c57 if (BN_bn2binpad(pubX, rawMaterial + offset, keyMaterial->xSize) <= 0) { in TransEccKeyToKeyBlob()
60 offset += keyMaterial->xSize; in TransEccKeyToKeyBlob()
83 keyMaterial->xSize = HKS_KEY_BYTES(keyLen); in EccSaveKeyMaterial()
163 *publicXSize = keyMaterial->xSize; in GetEccModules()
180 BIGNUM *pubX = BN_bin2bn(keyPair + offset, xSize, NULL); in EccInitPublicKey()
181 offset += xSize; in EccInitPublicKey()
439 publickeyMaterial->xSize = keyMaterial->xSize; in GetEccPubKey()
446 keyMaterial->xSize + keyMaterial->ySize) != 0) { in GetEccPubKey()
470 uint32_t xSize = HKS_KEY_BYTES(keyLen); in EcKeyToPublicKey() local
476 uint32_t totalSize = xSize + ySize + sizeof(struct HksPubKeyInfo); in EcKeyToPublicKey()
[all …]
H A Dopenssl_dsa_helper.c89 x = BinToBN(key->data + offset, keyMaterial->xSize); in InitDsa()
90 offset += keyMaterial->xSize; in InitDsa()
290 keyMaterial->xSize = 0; in X509ToDsaPublicKey()
297 uint32_t offset = sizeof(struct KeyMaterialDsa) + keyMaterial->xSize; in X509ToDsaPublicKey()
357 …keyMaterial->xSize = (keyByteLen > OPENSSL_DSA_KEY_LEN_DIVID) ? HKS_DIGEST_SHA256_LEN : HKS_DIGEST… in SaveDsaKeyToHksBlob()
374 if (BN_bn2bin(x, key->data + offset + (keyMaterial->xSize - (uint32_t)BN_num_bytes(x))) <= 0) { in SaveDsaKeyToHksBlob()
377 offset += keyMaterial->xSize; in SaveDsaKeyToHksBlob()
/ohos5.0/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
H A Dhks_openssl_ecc.c86 retCode = BN_bn2binpad(pubX, rawMaterial + offset, keyMaterial->xSize); in TransEccKeyToKeyBlob()
91 offset += keyMaterial->xSize; in TransEccKeyToKeyBlob()
127 keyMaterial->xSize = HKS_KEY_BYTES(keySize); in EccSaveKeyMaterial()
210 if ((keyMaterial->xSize == 0) || (keyMaterial->ySize == 0)) { in HksOpensslGetEccPubKey()
215 output->size = sizeof(struct KeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize; in HksOpensslGetEccPubKey()
220 publickeyMaterial->xSize = keyMaterial->xSize; in HksOpensslGetEccPubKey()
225 input->data + sizeof(struct KeyMaterialEcc), keyMaterial->xSize + keyMaterial->ySize); in HksOpensslGetEccPubKey()
236 *publicXSize = keyMaterial->xSize; in GetEccModules()
243 static int32_t EccInitPublicKey(EC_KEY *eccKey, const uint8_t *keyPair, uint32_t xSize, uint32_t yS… in EccInitPublicKey() argument
254 BIGNUM *pubX = BN_bin2bn(keyPair + offset, xSize, NULL); in EccInitPublicKey()
[all …]
H A Dhks_openssl_dsa.c58 if (keyMaterial->xSize == 0) { in InitDsaStructKey()
62 …cpy_s(buff, HKS_KEY_BYTES(keyMaterial->keySize), key->data + *offset, keyMaterial->xSize) != EOK) { in InitDsaStructKey()
66 x = BN_bin2bn(buff, keyMaterial->xSize, NULL); in InitDsaStructKey()
69 *offset += keyMaterial->xSize; in InitDsaStructKey()
192 &keyMaterial->xSize, in DsaKeyMaterialParam()
211 ret = BN_bn2bin(x, rawMaterial + offset + (keyMaterial->xSize - (uint32_t)BN_num_bytes(x))); in DsaKeyMaterialData()
216 offset += keyMaterial->xSize; in DsaKeyMaterialData()
317 publickeyMaterial->xSize = 0; in HksOpensslGetDsaPubKey()
323 if (memcpy_s(output->data + sizeof(struct KeyMaterialDsa) + publickeyMaterial->xSize, in HksOpensslGetDsaPubKey()
324 output->size - (sizeof(struct KeyMaterialDsa) + publickeyMaterial->xSize), in HksOpensslGetDsaPubKey()
[all …]
H A Dhks_openssl_sm2.c84 keyMaterial->xSize = pubXBlob.size; in EvpPkeyToKeyMaterialEc()
163 "u", keyMaterial->keySize, keyMaterial->xSize, keyMaterial->ySize, keyMaterial->zSize); in GetSm2Modules()
167 (keyMaterial->xSize > HKS_KEY_BYTES(keyMaterial->keySize)) || in GetSm2Modules()
170 … (sizeof(struct KeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize + keyMaterial->zSize != in GetSm2Modules()
175 …if (keyBlob->size < sizeof(struct KeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize + keyM… in GetSm2Modules()
197 … uncompressedPublicKey + 1 + HKS_KEY_BYTES(material->keySize) - material->xSize, material->xSize, in PushPubKeyToParam()
198 (const uint8_t *)(material) + sizeof(struct KeyMaterialEcc), material->xSize); in PushPubKeyToParam()
204 … (const uint8_t *)(material) + sizeof(struct KeyMaterialEcc) + material->xSize, material->ySize); in PushPubKeyToParam()
238 if (material->xSize != 0 && material->ySize != 0) { in ConstructSm2ParamsFromRawKey()
254 material->xSize + material->ySize, material->zSize, NULL); in ConstructSm2ParamsFromRawKey()
/ohos5.0/docs/zh-cn/application-dev/reference/apis-universal-keystore-kit/
H A D_o_h___huks___key_material_ecc.md22 | uint32_t [xSize](#xsize) | x值的长度。 |
48 ### xSize subsection
51 uint32_t OH_Huks_KeyMaterialEcc::xSize
H A D_o_h___huks___key_material_dsa.md22 | uint32_t [xSize](#xsize) | x值的长度。 |
77 ### xSize subsection
80 uint32_t OH_Huks_KeyMaterialDsa::xSize
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/framework_test/common_test/src/
H A Dhks_check_paramset_test.cpp321 .xSize = HKS_ECC_KEY_SIZE_521,
340 materialEcc.xSize = HKS_ECC_KEY_SIZE_521 + 1;
344 materialEcc.xSize = HKS_ECC_KEY_SIZE_521;
355 materialEcc.xSize = 0;
359 materialEcc.xSize = HKS_ECC_KEY_SIZE_521;
380 .xSize = MAX_KEY_SIZE + 1,
403 materialDsa.xSize = MAX_KEY_SIZE;
435 .xSize = MAX_KEY_SIZE,
450 materialDsa.xSize = 0;
454 materialDsa.xSize = MAX_KEY_SIZE;
/ohos5.0/base/security/huks/utils/crypto_adapter/
H A Dhks_client_service_adapter_lite.c346 static int32_t CheckEccXySize(const uint32_t xSize, const uint32_t ySize) in CheckEccXySize() argument
349 if ((xSize > maxKeyByteLen) || (ySize > maxKeyByteLen)) { in CheckEccXySize()
350 …nvalid ecc public key size! xSize = 0x%" LOG_PUBLIC "X, ySize = 0x%" LOG_PUBLIC "X", xSize, ySize); in CheckEccXySize()
360 uint32_t xSize = mbedtls_mpi_size(&(pubKey->MBEDTLS_PRIVATE(grp).P)); in X509PublicKeyToEcc() local
363 int32_t ret = CheckEccXySize(xSize, ySize); in X509PublicKeyToEcc()
366 uint32_t totalSize = sizeof(struct HksPubKeyInfo) + xSize + ySize; in X509PublicKeyToEcc()
380 pubKeyInfo->nOrXSize = xSize; in X509PublicKeyToEcc()
385 keyBuffer + sizeof(struct HksPubKeyInfo), xSize); in X509PublicKeyToEcc()
393 keyBuffer + sizeof(struct HksPubKeyInfo) + xSize, ySize); in X509PublicKeyToEcc()
H A Dhks_client_service_adapter.c216 …uint32_t keyMaterialSize = sizeof(struct KeyMaterialDsa) + keyMaterial->xSize + keyMaterial->ySize… in GetDsaPubKeyParam()
222 uint32_t offset = sizeof(struct KeyMaterialDsa) + keyMaterial->xSize; in GetDsaPubKeyParam()
509 uint32_t xSize = HKS_KEY_BYTES(keyLen); in EcKeyToPublicKey() local
517 uint32_t totalSize = xSize + ySize + sizeof(struct HksPubKeyInfo); in EcKeyToPublicKey()
524 pubKeyInfo->nOrXSize = xSize; in EcKeyToPublicKey()
527 if (BN_bn2binpad(x, keyBuffer + sizeof(struct HksPubKeyInfo), xSize) == 0 || in EcKeyToPublicKey()
528 BN_bn2binpad(y, keyBuffer + sizeof(struct HksPubKeyInfo) + xSize, ySize) == 0) { in EcKeyToPublicKey()
672 keyMaterial->xSize = 0; in X509PublicKeyToDsa()
678 if ((BN_bn2bin(y, keyBuffer + sizeof(struct KeyMaterialDsa) + keyMaterial->xSize) == 0) || in X509PublicKeyToDsa()
679 … (BN_bn2bin(p, keyBuffer + sizeof(struct KeyMaterialDsa) + keyMaterial->xSize + ySize) == 0) || in X509PublicKeyToDsa()
[all …]
/ohos5.0/docs/en/application-dev/reference/apis-universal-keystore-kit/
H A D_o_h___huks___key_material_ecc.md22 | uint32_t [xSize](#xsize) | Length of **x**. |
50 ### xSize subsection
53 uint32_t OH_Huks_KeyMaterialEcc::xSize
H A D_o_h___huks___key_material_dsa.md22 | uint32_t [xSize](#xsize) | Length of **x**. |
79 ### xSize subsection
82 uint32_t OH_Huks_KeyMaterialDsa::xSize
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
H A Dhks_import_sign_verify_test.cpp405 material.xSize = sizeof(g_xData); in ConstructImportedDsaPriOrPairKey()
411 uint32_t size = sizeof(material) + material.xSize + material.ySize + in ConstructImportedDsaPriOrPairKey()
431 offset += material.xSize; in ConstructImportedDsaPriOrPairKey()
480 material.xSize = 0; in ConstructEcPrivateKey()
540 material.xSize = xDataBlob->size; in ConstructEcKey()
563 offset += material.xSize; in ConstructEcKey()
586 const uint32_t xSize; member
604 material.xSize = isPriKey ? 0 : sm2Key->xSize; in ConstructImportedSm2Key()
628 offset += material.xSize; in ConstructImportedSm2Key()
654 .xSize = sizeof(g_sm2XDataOpenssl1), in ConstructImportedSm2KeyForOpenssl1()
[all …]
/ohos5.0/base/security/huks/services/huks_standard/huks_engine/main/core_dependency/src/
H A Dhks_chipset_platform_key_hardcoded.c48 .xSize = PLATFORM_KEY_PLATFORM_PRI_KEY_SIZE, in MallocAndFillFullHksPublicKey()
81 .xSize = PLATFORM_KEY_PLATFORM_PRI_KEY_SIZE, in MallocFullPlatformPrivateKey()
/ohos5.0/docs/zh-cn/application-dev/graphics/
H A Ddisplaysync-xcomponent.md65 … int32_t xSize = OH_NativeXComponent_GetXComponentSize(component, nativeWindow, &width, &height);
66 if ((xSize == OH_NATIVEXCOMPONENT_RESULT_SUCCESS) && (render != nullptr)) {
/ohos5.0/foundation/graphic/graphic_2d/rosen/samples/opengl/test_eglCreateWindowSurface/entry/src/main/cpp/render/
H A Dplugin_render.cpp50 int32_t xSize = OH_NativeXComponent_GetXComponentSize(component, window, &width, &height); in OnSurfaceCreatedCB() local
51 if ((xSize == OH_NATIVEXCOMPONENT_RESULT_SUCCESS) && (render != nullptr)) { in OnSurfaceCreatedCB()
/ohos5.0/base/security/huks/interfaces/inner_api/huks_standard/main/include/
H A Dhks_type.h166 uint32_t xSize; member
177 uint32_t xSize; member
/ohos5.0/foundation/graphic/graphic_2d/rosen/test/2d_graphics/drawing_ndk/cpp/dm/
H A Danisotropic.h46 void Draw(OH_Drawing_Canvas *canvas, int x, int y, int xSize, int ySize);
/ohos5.0/base/security/huks/interfaces/kits/c/include/
H A Dnative_huks_type.h867 uint32_t xSize; member
886 uint32_t xSize; member
/ohos5.0/base/security/huks/frameworks/huks_standard/main/common/include/
H A Dhks_crypto_hal.h88 uint32_t xSize; member
96 uint32_t xSize; member
/ohos5.0/base/security/huks/frameworks/huks_standard/main/common/src/
H A Dhks_check_paramset.c539 … if ((keyMaterial->xSize > HKS_ECC_KEY_SIZE_521) || (keyMaterial->ySize > HKS_ECC_KEY_SIZE_521) || in CheckEccKeyLen()
549 …if ((keyType == HKS_KEY_TYPE_KEY_PAIR) && ((keyMaterial->xSize == 0) || (keyMaterial->ySize == 0))… in CheckEccKeyLen()
554 …uint32_t keySize = sizeof(struct HksKeyMaterialEcc) + keyMaterial->xSize + keyMaterial->ySize + ke… in CheckEccKeyLen()
577 if ((keyMaterial->xSize > MAX_KEY_SIZE) || (keyMaterial->ySize > MAX_KEY_SIZE) || in CheckDsaKeyLen()
584 if ((keyMaterial->xSize == 0) || in CheckDsaKeyLen()
595 uint32_t keySize = sizeof(struct HksKeyMaterialDsa) + keyMaterial->xSize + keyMaterial->ySize + in CheckDsaKeyLen()
/ohos5.0/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
H A Dcert_manager_app_cert_process.c71 retCode = BN_bn2binpad(pubX, rawMaterial->data + offset, keyMaterial->xSize); in TransEccKeyToKeyBlob()
76 offset += keyMaterial->xSize; in TransEccKeyToKeyBlob()
122 keyMaterial->xSize = CM_KEY_BYTES(keySize); in SaveKeyMaterialEcc()
/ohos5.0/docs/en/application-dev/graphics/
H A Ddisplaysync-xcomponent.md65 … int32_t xSize = OH_NativeXComponent_GetXComponentSize(component, nativeWindow, &width, &height);
66 if ((xSize == OH_NATIVEXCOMPONENT_RESULT_SUCCESS) && (render != nullptr)) {
/ohos5.0/foundation/graphic/graphic_2d/rosen/samples/opengl/test_xComponentContext/entry/src/main/cpp/samples/
H A Dsample_bitmap.cpp312 int32_t xSize = OH_NativeXComponent_GetXComponentSize(component, window, &width, &height); in OnSurfaceCreatedCB() local
313 if (xSize == OH_NATIVEXCOMPONENT_RESULT_SUCCESS) { in OnSurfaceCreatedCB()

12