Hi thereI cannot find a way to export public keys using the ObjC Library. In Java there exist KeysetWriter, but in the ObjC Library I cannot find any equivalent class or function. Am I missing something?I do the following (actualy it is swift code, the ObjC Library is included in the bridging header):let keyTemplate = try TINKHybridKeyTemplate(keyTemplate: TINKHybridKeyTemplates.eciesP256HkdfHmacSha256Aes128Gcm)let keysetHandle = try TINKKeysetHandle(keyTemplate: keyTemplate)let publicKeysetHandle = try TINKKeysetHandle.publicKeysetHandle(with: keysetHandle)...Here I want to export the public key (for example as json) for being able to send it to the counterpart. How can I achieve that?
Thanks for your help and for providing this valuable library.Kind regardsReto
--
You received this message because you are subscribed to the Google Groups "tink-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tink-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tink-users/1245380e-7ab5-44b7-8463-443dd109fbbcn%40googlegroups.com.
Hi,Got an update.On searching the documentation for Tink 1.6.0, saw this (see attached screenshot)On testing in my code, found that the following gave a valid output:let config = try! TINKAeadConfig.init()try! TINKConfig.register(config)let template = try! TINKAeadKeyTemplate.init(keyTemplate: .TINKAes256Gcm)let handle = try! TINKKeysetHandle.init(keyTemplate: template)let firstData = handle.serializedKeyset()
--
You received this message because you are subscribed to the Google Groups "tink-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tink-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tink-users/d4ec3621-7e44-420d-bc6c-0fcc7f7f9b67n%40googlegroups.com.
Wait, does this function exist? I can't find it in https://github.com/google/tink/blob/master/objc/TINKKeysetHandle.h.
We don't support exporting the key material because we're afraid that users might dump it in insecure locations.If you really want to get it, consider writing it to iOS KeyChain using writeToKeychainWithName, and then reading it from iOS KeyChain (like this).
Wait, does this function exist? I can't find it in https://github.com/google/tink/blob/master/objc/TINKKeysetHandle.h.Its inside TINKKeysetHandle+Cleartext.h
We don't support exporting the key material because we're afraid that users might dump it in insecure locations.If you really want to get it, consider writing it to iOS KeyChain using writeToKeychainWithName, and then reading it from iOS KeyChain (like this).I went through this code. From what I understand, we need to copy the SecKey from Keychain and then convert it into Data format. right? I'm implementing it in swift. But is the above implementation incorrect(handle.serializedKeyset()) ? Our implementation requires this conversion hence that's why I'm trying to do this.
--
You received this message because you are subscribed to the Google Groups "tink-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tink-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tink-users/3687c946-c54f-499a-87e7-05169cd01fa6n%40googlegroups.com.