[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
AES Encryption from Python
Author Message
jvanveen Offline
Junior Member
**

Posts: 5
Joined: Feb 2015
Reputation: 0
Post: #1
AES Encryption from Python
Hello!

I'm trying to aes encrypt general/mac configs using two 16-character keys before sending them over the wire to a Yealink T46G phone.

Using yealinkencrypt(the aes encryption binary from Yealink) I managed to provision the phone with the two keys. Today I found http://cuttingedge.io/yealink-device-pro...ython.html , which suggests it can do the same thing from Python, which would be much easier to work with when creating dynamic config files. I used the same keys, but it generates a slightly different output. The two encrypted files from Python also fail to parse from the Phone (logs say it fails to decrypt).

Does anyone know why the result of the python script differs from the yealink encryption tool? It would be awesome if config files can be encrypted from python! Angel

I'm not sure what i'm doing wrong here. File output looks almost the same, except y000000000028.cfg from Py is 512 bytes and from yealinkencrypt it is 496 bytes. The mac specific config from Py is 3328 bytes and from yealinkencrypt it is 3264 bytes. Could it be that the Py version includes the AES key in the output, and yealinkencrypt doesn't?
(This post was last modified: 02-04-2015 01:43 AM by jvanveen.)
02-04-2015 01:31 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jvanveen Offline
Junior Member
**

Posts: 5
Joined: Feb 2015
Reputation: 0
Post: #2
RE: AES Encryption from Python
Although the filesizes differ, the yealinkencrypt version of the file can be decrypted using the Python version using the correct key, however the phone fails to decode the Python version.

Changing the blocksize to 16 produces a file with exact the same bytesize as yealinkencrypt produces. Using cmp it seems only the padding at the end of the file differs(?). Are there any Yealink specs on what type of AES is actually being used? (padding/blocksize/etc.) The documentation is kinda leaving me in the dark Sad
(This post was last modified: 02-04-2015 04:20 PM by jvanveen.)
02-04-2015 04:17 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  AES Encryption ldardini 12 45,416 04-05-2015 07:27 AM
Last Post: damo@launtel.net.au

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication