     /// - parameters:
     ///     - publicTag: Tag to use for the public key
     ///     - privateTag: Tag to use for the private key
-    ///     - keySize: Size of the RSA key pair
+    ///     - keySize: Size of the RSA key pair (in bits)
     ///
     /// - returns: Heimdall instance ready for both public and private key operations
     ///

        return nil
    }
    
    private class func decrypt(data: NSData, key: NSData, algorithm: CCAlgorithm) -> NSData? {
        let encryptedData = UnsafePointer<UInt8>(data.bytes)
        let encryptedDataLength = data.length
        
        if let result = NSMutableData(length: encryptedDataLength) {
            let keyData = UnsafePointer<UInt8>(key.bytes)
            let keyLength = size_t(key.length)
            
            let decryptedData = UnsafeMutablePointer<UInt8>(result.mutableBytes)
            let decryptedDataLength = size_t(result.length)
            
            var decryptedLength: size_t = 0
            
            let status = CCCrypt(CCOperation(kCCDecrypt), algorithm, CCOptions(kCCOptionPKCS7Padding), keyData, keyLength, nil, encryptedData, encryptedDataLength, decryptedData, decryptedDataLength, &decryptedLength)
            
            if UInt32(status) == UInt32(kCCSuccess) {
                result.length = Int(decryptedLength)

    ///
    public func decrypt(encryptedData: NSData) -> NSData? {
        if let key = obtainKey(.Private) {
            let algorithm = CCAlgorithm(kCCAlgorithmAES128)
            
            // First block contains the encrypted AES key and the IV
            let blockSize = SecKeyGetBlockSize(key)
            let ivSize = Heimdall.blockSize(algorithm)
            let keySize = Heimdall.keySize(blockSize - ivSize)
            
            let metadata = encryptedData.subdataWithRange(NSRange(location: 0, length: blockSize))
            let messageData = encryptedData.subdataWithRange(NSRange(location: blockSize, length: encryptedData.length - blockSize))
            
            // Decrypt the key and the IV
            if let decryptedMetadata = NSMutableData(length: blockSize) {
                let encryptedMetadata = UnsafePointer<UInt8>(metadata.bytes)
                let decryptedMetadataBytes = UnsafeMutablePointer<UInt8>(decryptedMetadata.mutableBytes)
                
                var decryptedMetadataLength = blockSize
                let decryptionStatus = SecKeyDecrypt(key, .PKCS1, encryptedMetadata, metadata.length, decryptedMetadataBytes, &decryptedMetadataLength)
                
                if decryptionStatus == noErr {
                    decryptedMetadata.length = Int(decryptedMetadataLength)
                    
                    // We can now extract the key and the IV
                    let decryptedKey = decryptedMetadata.subdataWithRange(NSRange(location: 0, length: keySize))
                    let decryptedIv = decryptedMetadata.subdataWithRange(NSRange(location: keySize, length: ivSize))
                    
                    if let message = Heimdall.decrypt(messageData, key: decryptedKey, iv: decryptedIv, algorithm: algorithm) {
                        return message
                    }
                }
