I'm making an application that needs encrypt/decrypt GPG messages but it needs generate its own keys (public/private).
I'm using ObjectivePGP and it works great, but it doesn't generate the keys by itself (or I don't know how to do it), so I need to generate it via command line with gpg or some online tools.
My question is: Is there some way to create these keys inside my app? Maybe some framework with appstore friendly license.
Notes:
I've tried with UNNetPGP, but it doesn't work when I try to encrypt messages with public keys generated by other applications or decrypt messages encrypted by these applications. I have even tried just use UNNetPGP just to generate the keys and import them to ObjectivePGP, but I receive messages like "Decrypt key doesn't exist" or similar (this doesn't happen when I use another keys).
Related
Assuming I have an app on iOS that generates a data file, and I would like the user the ability to import/export that file, how is that best done?
Import from email in xcode/objc:
http://www.raywenderlich.com/1980/email-tutorial-for-ios-how-to-import-and-export-app-data-via-email-in-your-ios-app
Is this possible in Delphi? (i.e. register an ios app as file handler for a specifc file type)
(I am planning on handling export through generating an email attaching a file? I suspect this is probably possible although if anyone knows for sure, feel free to share)
It has been asked why import/export across email is useful.
Because legally EU/US law and cloud storage is difficult with personal data
You don't need any desktop computers
You can sync data between ios and android apps if user changes mobile
You are not bound to any specific cloud provider or anything similar
Quote from above article where author explains where the file path is passed to the app:
application:didFinishLaunchingWithOptions, passing the URL in the
UIApplicationLaunchOptionsURLKey, or via application:handleOpenURL.
But since I have not used Delphi for ages (for mobile), I would just like to know for sure if Delphi supports this or not before buying a new version
You can send files using email. I use the email component from D.P.F Delphi iOS Native Components to send file attachments using email. I don't see any reason why you should not be able to send your data file as long as it is not too big. Use a file extension that is unique to your app.
You could also use iTunes filesharing in order to give your users direct access to your data file. Just set the UIFileSharingEnabled key in your info.plist and store you data file inside of the documents folder. This does require a desktop PC, but it is still a very nice addition to sending backups by email.
Depending on your needs,
I would suggest looking at perhaps saving the file to a server using FTP and Indy and then on the other device you can retrieve it?
http://www.delphipages.com/forum/showthread.php?t=208397
Set the TidFTP connection parameters
Do a FTP put : // ftp.Put('testfile.txt');
Perhaps have a Database with a column that you specify a file version etc
Do a simple Get request if you want to retrive the file with the filename
or Alternatively you can save it to a blob field in a DB and have the other device read the blobfield if you don't want to do it via FTP
I am generating pdf using wicked_pdf and I am also using prawntable for pdfs which needs to be password protected. Since wicked pdf doesnt supports password protected pdf generation.
Is there any way to add a digital signature which is in .pfx format to pdf.?
Passwording pdf files vs digitally signing them
Passwording a pdf file encrypts the file. You will need to find a pdf library/toolkit to do that for you. If you can't find one with a ruby API, then you can call it as a command from ruby. The latter is not as elegant but works fine. (Be sure to catch and handle errors.)
Digitally signing a pdf is completely different than encryption. The result of signing is a pdf with one or more digital signatures. You use either a library to sign a file locally or, for a more dependable system, sign the file via a dedicated appliance that also holds the signer's private key and certificate.
Unlike password protection/encryption, anyone who receives a digitally signed pdf file can read the file's content. The digital signatures provide the relying party (the recipient) with assurances about:
the identity of the person who signed the file
the integrity of the file (confirming that it wasn't changed since signing)
the non-reputability of the file (confirming that the signer can't claim that they hadn't signed the file)
An important issue is that having a signer's private key on the file system of a regular computer/server is not secure enough to provide any guarantee against repudiation by the signer--she could truthfully say that there is no way to assure that her "signature" was not forged by un-authorized use of the pfx file.
The Origami library has a very basic support for PDF digital signatures and there is sample code for this at https://github.com/gdelugre/origami/blob/master/examples/signature/signature.rb.
I have a custom requirement in one of my products and I need to protect or encrypt files that are stored inside the NSDocumentsDirectory folder. Even if these documents are mailed (The app has the ability to mail documents) to some other person , he or she will not be able to open this document without using my app (I will be using open in functionality of email attachments). So basically only the application can access all these documents and without the app the documents should be mere junk. IS there any way to do it, or has any one done something before.
I also saw this but could not get a complete idea.
If you want a quick and easy method for data that doesn't need serious security, just zip the files with a fixed password.
ZipArchive is a good library for this.
For a more serious approach, check iOS - Protecting files with a custom encryption key?
The other post you mentioned works on the concept of password protecting the files, I had encountered the same issue that was for my custom defined files in which our team, encoded the contents of the file on random locations, and saved it.
Only our Application could decode it correctly as we had the key :)
It was a windows application, It would work here also.
Is there a way that I can know the hash all or part of an iOS app's executable file, prior to submitting my app for approval?
Would it be possible to include a magic constant in my app, so I could use its approximate position as a starting point for taking a SHA512 hash of most of the executable file? I would like to add additional executable verification mechanisms to my app.
EDIT: After some searching on the Apple Developer site, I've run across the Mach-O File Format specification.
Apple encrypts portions of the executable file, so any file hash prior to submission is likely to be invalid on a distributed app.
What you might be able to do is hash/checksum portions of the app as it executes in memory, by getting live function pointers and using them as start addresses.
A couple of months after installing successfully the BlackBerry signature key for signing my application, I have lost my private key. How can I retrieve it?
I have already sent an email to BlackBerry developers' support, but they're really slow in replying.
Search your hard-drive or trash-bin for sigtool.* :
You need to find sigtool.csk and sigtool.db. If you can find these files you can copy them to your Components\bin folder. For example:
C:\eclipses\BB1.1.2\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.29\components\bin
Or you can use the Import Key Feature of the Blackberry Plugin and point it to these files.
If you can't find these files, then you need TechSupport to resend you the three CSI files for creating your keys. Note, after you create a key-set with these csi files they are useless, so you can't use them to recreate new keys later.
I suggest backing up the sigtool files after you find/recreate them.
Good Luck mate!