I am looking through the UFTP code after attempting to set a block size of 400 and noticed that the minimum value allowable was 512. I understand why the block size is required to be 200 less then MTU size but is there a specific reason for the minimum?
Thanks,
Ernast
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The main reason is related to the maximum RSA key size allowed, which is 2048. A CLIENT_KEY message contains the client's RSA public key as well as a signature. With a 2048-bit key, the size of these two structures is 512 bytes.
In addition to this, too small of a block size means that sections are smaller resulting in more sections and therefore more frequent intervals of STATUS messages being returned. Also, since disks typically have a sector size of 512 bytes, it makes sense to have the block size be at least that big for write efficiency.
Regards,
Dennis
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for the reply and apologies for taking so long to get back to you. The efficiency issues aside, if encryption is not being used it should be fine to drop the block size below 512 right?
Thanks,
Ernast
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Dennis!
I am looking through the UFTP code after attempting to set a block size of 400 and noticed that the minimum value allowable was 512. I understand why the block size is required to be 200 less then MTU size but is there a specific reason for the minimum?
Thanks,
Ernast
Ernast,
The main reason is related to the maximum RSA key size allowed, which is 2048. A CLIENT_KEY message contains the client's RSA public key as well as a signature. With a 2048-bit key, the size of these two structures is 512 bytes.
In addition to this, too small of a block size means that sections are smaller resulting in more sections and therefore more frequent intervals of STATUS messages being returned. Also, since disks typically have a sector size of 512 bytes, it makes sense to have the block size be at least that big for write efficiency.
Regards,
Dennis
Hello Dennis,
Thank you for the reply and apologies for taking so long to get back to you. The efficiency issues aside, if encryption is not being used it should be fine to drop the block size below 512 right?
Thanks,
Ernast
That being the case, you should be fine with a 400 byte block size.
Awesome! Thank you very much!