I figured this out. Turns out the access key should be interpreted as an ASCII or UTF-8 string, and not a hex string, for the encryption key. Thus, ticket_key
is decrypted as a 128-bit key with 128-bits of padding, not 256 bits total.
Search found 3 matches
- 2023年 Dec 8日 02:45
- Forum: Cloud/SaaS Development
- Topic: Encryption for Smart Lock API
- Replies: 9
- Views: 7144
Re: Encryption for Smart Lock API
- 2023年 Nov 24日 04:19
- Forum: Cloud/SaaS Development
- Topic: Encryption for Smart Lock API
- Replies: 9
- Views: 7144
Re: Encryption for Smart Lock API
You should encrypt your password by using the AES-128 algorithm with ECB mode and PKCS7Padding. https://developer.tuya.com/en/docs/cloud/doorlock-api-password?id=Kbe2nztqcoapu#title-5-Create%20a%20temporary%20password Thank you kobe, but which encryption key do I use for this? The temporary key I r...
- 2023年 Nov 23日 05:00
- Forum: Cloud/SaaS Development
- Topic: Encryption for Smart Lock API
- Replies: 9
- Views: 7144
Encryption for Smart Lock API
Hi, I am running into an error when trying to create a temporary password for my Wi-Fi Smart Lock. This is my error message: "Error: request api failed: param is illegal ,please check it" Here are my steps: I retrieve a ticket_key and ticket_id using /v1.0/devices/{device_id}/door-lock/pas...