[Under evaluation][Free] Advanced Data Encryption Extension

  • introduction
  • Introducing the Advanced Data Encryption Extension for MIT App Inventor, created by Mr_Kodr. This extension provides a comprehensive set of tools for encrypting and securing sensitive information, including advanced algorithms like AES, RSA, DES, and base-64. It enables users to encrypt files, folders, and entire hard drives with ease, while also providing a user-friendly interface and options for creating backups of encrypted data. The extension ensures that sensitive data can only be accessed by authorized individuals and provides an added layer of security against cyber threats. With the Advanced Data Encryption Extension,
    users can confidently protect their important data with a high layer of security

  • blocks
  • Explenation

  • component_method (13)

    This block "ConvertDuration" takes an argument "timeInMillis" which is the time in milliseconds and converts it to a duration format "hh:mm:ss". It calculates the total number of seconds, hours, minutes and seconds and returns a string in the format "hh:mm:ss". This can be used to format the duration of media files or other time-related data.



    component_method

    This block "ConvertTimeMinutes" also takes an argument "timeInMillis" which is the time in milliseconds and converts it to a duration format "mm:ss". It calculates the total number of minutes and seconds and returns a string in the format "mm:ss". This can be used to format the duration of media files or other time-related data.



    component_method (1)

    This block "ConvertTimeSeconds" also takes an argument "timeInMillis" which is the time in milliseconds and converts it to a duration format "ss". It calculates the total number of seconds and returns a string in the format "ss". This can be used to format the duration of media files or other time-related data.



    component_method (2)

    This block "DecodeBase64" takes a single argument, "encodedText" which is a string representing the encoded text that you want to decode. This function uses the built-in Base64 decoder from the Java standard library to decode the encoded text. The decoder takes the encoded text as an input and returns an array of bytes. The returned byte array is then converted to a string using the new String() constructor and this decoded string is returned as the output of the function. This block can be used to decode any text encoded using the base64 algorithm and can be useful for decoding data that has been encrypted or for decoding encoded data used for authentication.



    component_method

    This block "DecryptAES" also takes two arguments, a key and the encrypted data, and decrypts the data using the AES algorithm. The key must be the same key used to encrypt the data. The function uses the key to create a SecretKeySpec object, which is used to initialize the AES cipher. The cipher is then used to decrypt the data and the original data is returned as a string.



    component_method (6)

    This block "DecryptDES" also takes two arguments, "key" and "encryptedData". The key must be 8 bytes long, and the encryptedData is the message that needs to be decrypted. The function uses the Data Encryption Standard (DES) algorithm to decrypt the data. The decryption is performed using a SecretKeySpec object, which is initialized with the key bytes and the "DES" algorithm. The Cipher object is then initialized with the decryption mode and the secret key, and the data is decrypted using the "doFinal" method. The decrypted data is returned as a string.



    component_method (7)

    [the most secure between them] This block "DecryptRSA" takes a string argument "encryptedData" which is a base64 encoded string, that was encrypted using the RSA algorithm. The function creates a Cipher object using the RSA algorithm and initializes it with the private key in decryption mode. The encrypted data is then decoded from the base64 string and passed to the doFinal method to decrypt it. The original data is then returned as a string.



    component_method (8)

    This block "EncodeToBase64" takes an argument "text" which is the plain text to be encoded and returns the base64 encoded string of the text. Base64 encoding is a process of converting binary data to a ASCII text format. It is commonly used to transmit binary data over a network connection or to store binary data in a text file.



    component_method (1)

    The function "EncryptAES" takes two arguments, a "key" and a "data" , and encrypts the data using AES encryption algorithm. The key must be a multiple of 8 bytes long could be 16,24, or 32 bytes long. The function uses the key to create a SecretKeySpec object, which is used to initialize the AES cipher. The cipher is then used to encrypt the data and the encrypted data is returned in Base64 encoded format.

    component_method (12)

    This block "EncryptDES" takes two arguments, "key" and "data". The key must be 8 bytes long, and the data is the message that needs to be encrypted. The function uses the Data Encryption Standard (DES) algorithm to encrypt the data. The encryption is performed using a SecretKeySpec object, which is initialized with the key bytes and the "DES" algorithm. The Cipher object is then initialized with the encryption mode and the secret key, and the data is encrypted using the "doFinal" method. The encrypted data is then encoded to base64 and returned as a string.



    component_method (14)

    [the most secure between them] This block "EncryptRSA" takes a string argument "data" and encrypts it using the RSA algorithm. The RSA algorithm is a public-key encryption algorithm that is widely used to secure sensitive information. The function generates a new key pair using the KeyPairGenerator class and initializes it with a key size of 2048 bits. The public and private keys are then extracted from the key pair and stored in the respective variables. The function then creates a Cipher object using the RSA algorithm and initializes it with the public key in encryption mode. The data is then encrypted using the doFinal method and the encrypted data is encoded to a base64 string and returned.



  • Tutorial
  • The conditions for the key for the AES-128, AES-192 and AES-256 functions is that the key must be multiple of 8 bytes long for example each one of them can accept 16 or 24 or 32 bytes long key.

    The difference between using AES with a key length of 16 bytes, 24 bytes, and 32 bytes is the level of security provided. AES-128, which uses a 128-bit key and input 16-bytes of long key, is considered to provide a good level of security for most uses. AES-192, which uses a 192-bit key and input 24-bytes of long key, provides a higher level of security and is typically used in government and military applications. AES-256, which uses a 256-bit key and input 32-bytes of long key, provides the highest level of security and is typically used in highly sensitive applications such as financial transactions and classified communications.



    For the DES function, the key must be 8 bytes long only.




    For the RSA block, no key length specified, but it is commonly used with a 2048-bit key.

    The base64 function does not have any specific key requirements. It is a method for encoding binary data as ASCII text. The functions that use base64 are primarily used to encode or decode data as a string, rather than encrypting or decrypting it.

  • Our socials
  • Telegram_channel
    Youtube


  • Download
  • Aix

    âť’ com.mrkoder.Encryption.lol.dev.aix


    Thanks

    1 Like

    The app icon is too large for AppInventor. Please resize to 16x16 or 32x32

    Some examples of keys for each of the encoding/encryption methods would be useful for newcomers to encryption, or a method to generate the keys....

    Some examples of usage for each of the methods would also support your extension

    We can probably live with the non AppInventor blocks :wink:

    Seems I can decrypt AES256 with the AES128 decrypt and AES192 decrypt blocks ? Encrypting with AES256 returns the same output as encrypting with AES128.

    Unlisting for the moment

    edited @TIMAI2

    This still appears to be possible. Is this correct ?

    I can decrypt AES256 with the AES128 decrypt and AES192 decrypt blocks ? Encrypting with AES256 returns the same output as encrypting with AES128.

    image

    Ok I will edit the extension to be one function but 128 or 256 or 192 only depends on the length of the key the Topic will be edited soon

    I cant edit this Topic
    Why?
    @TIMAI2

    At Trust Level 1 you run out of time to edit a new post. I have upped your Trust Level 2. Try again.

    You may need to refresh the community.

    Thanks @TIMAI2
    the Topic is now edited with the new Extension version

    Is there any problem with the Topic @TIMAI2

    Currently awaiting comments from others

    I am not really sure, but judging from comments from others, it is vulnerable. It used to be secure, but companies are now using it in insecure ways. Also how do you get those information?

    I don't know how they do that but
    I learned the code from here

    And

    Are you sure? Indications are that all these methods can be cracked. What they do is make it difficult for users who do not have the encryption to read the text. These methods are not totally secure :cry: but a good start to prevent some from reading the text. :slight_smile: The methods do provide an 'added layer of security'. Thank you.

    thank you, but
    what should I do to make it secure ?
    like should I edit the code to make it secure or what ?

    No simple algorithm is totally secure. You can't guarantee any of these methods is totally secure. Just say the algorithms provide a layer of security that the average person cannot defeat or something like that. :slight_smile: Don't guarantee something that your extension cannot do.

    ok got it :ok_hand:

    Please also use AppInventor blocks for your documentation, including a high quality screenshot of your samples as well.

    1 Like

    You also may want to read this, and take actions accordingly

    3 Likes