The present invention relates to selection of an algorithm for a processor-controlled device.
Various different algorithms may be executed by an electronic device to provide particular functionality. For example, there are a number of different cryptographic algorithms for encrypting and decrypting data. However, certain algorithms may be more suitable for use by a particular device than other algorithms.
It is known to identify an algorithm for use by a device for a given purpose by implementing and testing a number of different algorithms on the device and building a comparison table for the algorithms. The optimal algorithm for the device is then selected based on the comparison table.
However, this approach is not scalable. The number of tests to be performed increases dramatically as the number of devices to which an algorithm is to be deployed increases.
Furthermore, the tests generate a large amount of data, and therefore require a large amount of storage.
It is desirable to at least alleviate some of the aforementioned problems.
According to a first aspect of the present disclosure, there is provided a computer-implemented method of selecting an algorithm from a plurality of candidate algorithms for use by a processor-controlled device to perform an application, the method comprising: obtaining a respective value for one or more resource characteristics of the device; based on the one or more values, identifying one or more analogous reference devices having similar resource characteristics to the device; obtaining one or more reference performance values for execution of each of the plurality of candidate algorithms on each of the analogous reference devices; and selecting the algorithm based on the one or more reference performance values.
In some examples, the plurality of candidate algorithms are a plurality of candidate cryptographic algorithms.
In some examples, the one or more reference performance values comprise one or more resource loading values for the execution of each of the plurality of candidate algorithms on each of the analogous reference devices. The one or more resource loading values may be indicative of consumption of one or more hardware resources of the device for the execution of each of the plurality of candidate algorithms on each of the analogous reference devices. The one or more hardware resources may, for example, comprise: a processor of the device, storage of the device, or a power source of the device.
In some examples, the reference performance values comprise one or more algorithm performance values indicative of a performance of each of the plurality of candidate algorithms on each of the analogous reference devices.
In some examples, execution of each of the plurality of candidate algorithms comprises transmission of data via a network, and the reference performance values comprise a network characteristic value indicative of a data transmission characteristic associated with the transmission of the data via the network for the execution of each of the plurality of candidate algorithms on each of the analogous reference devices.
In some examples, the one or more resource characteristics comprise a respective characteristic of one or more hardware resources of the device, wherein optionally the one or more resource characteristics comprise one or more of: a processing capability of the device, a storage capability of the device, a power source of the device, or a communication capability of the device.
In some examples, identifying the one or more analogous reference devices comprises processing the one or more values for the one or more resource characteristics using a classifier trained to identify, from a plurality of reference devices, the one or more analogous reference devices having similar resource characteristics to the device.
In some examples, the method comprises obtaining one or more device performance values for execution of each of the plurality of candidate algorithms on the device, wherein selecting the algorithm comprises selecting the algorithm based further on the one or more device performance values. In some of these examples, obtaining the one or more device performance values comprises: executing each of the plurality of candidate algorithms on the device; and measuring the one or more device performance values for the execution of each of the plurality of candidate algorithms on the device. In some of these examples, the one or more device performance values comprise one or more device resource loading values for the execution of each of the plurality of candidate algorithms on the device.
In some examples, the method comprises obtaining a performance constraint to be satisfied by execution of the algorithm on the device, wherein selecting the algorithm comprises selecting the algorithm based further on the performance constraint. The performance constraint may comprise a resource loading constraint. In some of these examples, the plurality of candidate algorithms is a subset of available candidate algorithms and the method comprises selecting the plurality of candidate algorithms from the available candidate algorithms based on the performance constraint.
In some examples, the method comprises obtaining a score value for each of the plurality of candidate algorithms, based on the one or more reference performance values, wherein the algorithm is selected based on the score values.
In some examples, identifying the one or more analogous reference devices comprises identifying a plurality of analogous reference devices, and selecting the algorithm comprises selecting the algorithm based further on one or more of, for each of the reference performance values: an average performance value for each of the plurality of candidate algorithms, the average performance value for a respective candidate algorithm corresponding to an average of the reference performance value for execution of the respective candidate algorithm on each of the plurality of analogous reference devices; or a variance of the performance value for each of the plurality of candidate algorithms, the variance for a respective candidate algorithm corresponding to a variance of the reference performance value for execution of the respective candidate algorithm on each of the plurality of analogous reference devices.
In some examples, the one or more resource characteristics comprise a plurality of resource characteristics; the method comprises obtaining an importance metric for at least one of the plurality of resource characteristics indicative of a relative importance of the at least one of the plurality of resource characteristics in identifying the one or more analogous reference devices; and identifying the one or more analogous reference devices is based further on the importance metric for the least one of the plurality of resource characteristics.
In some examples, obtaining the one or more reference performance values comprises obtaining a plurality of reference performance values; the method comprises obtaining an importance metric for at least one of the plurality of reference performance values indicative of a relative importance of the at least one of the plurality of reference performance values in selecting the algorithm; and selecting the algorithm is based further on the importance metric for the least one of the plurality of reference performance values. In some of these examples, one or more of: the importance metric for the at least one of the plurality of resource characteristics or the importance metric for the least one of the plurality of reference performance values is received from a user.
In some examples, the method comprises instructing the device to use the algorithm to perform the application.
In some examples, the method is performed by a server of a network, the network further comprising the processor-controlled device.
According to a second aspect of the present disclosure, there is provided a data processing system configured to perform the method of any example in accordance with the first aspect.
According to a third aspect of the present disclosure, there is provided computer-readable medium storing thereon instructions which, when executed by a computer, cause the computer to carry out the method of any example in accordance with the first aspect.
For a better understanding of the present disclosure, reference will now be made by way of example only to the accompany drawings, in which:
Apparatus and methods in accordance with the present disclosure are described herein with reference to particular examples. The invention is not, however, limited to such examples.
Examples herein relate to selection of an algorithm for use by a processor-controlled device to perform an application. The algorithm is selected from a plurality of candidate algorithms based on reference performance values for execution of the candidate algorithms on analogous reference devices that are identified as having similar resource characteristics to the device for which the algorithm is to be selected. In other words, a suitable algorithm can be selected for a particular device based on the performance of the algorithm on other devices that are similar to the device in question. This approach is scalable, and means that the performance of the candidate algorithms need not be re-evaluated for each new device for which an algorithm is to be selected. Instead, the algorithm can be selected for the new device based on the performance of the candidate algorithms on the analogous reference devices. This process is hence more efficient than existing approaches that involve testing each candidate algorithm on each new device for which an algorithm is to be selected. The amount of data generated and stored in examples herein may be lower than these existing approaches, especially where the method is to be applied repeatedly to select a suitable algorithm for a large number of different devices. For example, the reference performance values may be obtained for relatively few reference devices, and then re-used to select an appropriate algorithm for a large number of different devices by inferring the performance of the candidate algorithms on a particular device based on the reference performance values for those analogous reference devices that are similar to the particular device for which the algorithm is to be selected.
The devices 102a-102c include a processor-controlled device 102a for which an algorithm is to be selected for use by the device 102a to perform an application. A processor-controlled device is for example any device controlled by a processor, such as a computer. In this example, the device 102a is an Internet of Things (IoT) device. An IoT device is for example a device with the means to communicate data within the environment, e.g. over a network local to the environment (such as the network 104 of
To address this, the server 104 of
The server 104 may have greater computational resources than the device for which the algorithm is to be selected. In this case, use of the server 104 to perform the selection allows algorithms to be selected for devices that lack sufficient computational power to perform the selection process themselves. The server 104 can also select and deploy algorithms to a number of different devices, allowing the algorithm selection and deployment to be coordinated efficiently. This for example allows coordinated deployment of an updated algorithm or an algorithm to perform a particular application to a set of devices, such as a set of devices associated with a particular enterprise, e.g. to deploy the algorithm simultaneously to the set of devices.
At item 202 of the method 200, a respective value for one or more resource characteristics of the device is obtained. A resource characteristic is for example a characteristic of a resource of or accessible to the device, such as a characteristic of a hardware resource of the device. The characteristic for example relates to a capability of the device to implement algorithms. For example, the one or more resource characteristics may include:
The values for the resource characteristics may be obtained in various different ways. In one example, a user of the device supplies the values, e.g. by entering the values using a suitable user interface. For example, the user can enter details of the device using an electronic form, e.g. an online form. In this case, the user can for example input a hardware specification (e.g. indicating details of the processor, storage, power source, communication capability etc. of the device), which may be taken as the resource characteristics or from which the values of the resources characteristics can be obtained. In another example, the values are detected by analysing the device. For example, a suitable monitoring process may be applied to the device to automatically detect the values, such as the /proc/cpuinfo routine, the top command, the ps (process status) command line utility, the vmstat command, or the nmon command on a Linux® operating system, or the Task Manager or SysInternals processes on a Windows® operating system.
At item 204 of the method 200, one or more analogous reference devices having similar resource characteristics to the device are identified, based on the one or more values obtained at item 202. The analogous reference devices may be inferred from the resource characteristics of the device and resource characteristics of a plurality of reference devices, to identify those reference devices that have similar resource characteristics to the device. In one example, the values obtained at item 202 are processed using a classifier trained to identify, from a plurality of reference devices, the one or more analogous reference devices having similar resource characteristics to the device. An example such as this is shown in
At item 206 of the method 200, one or more reference performance values for execution of each of the plurality of candidate algorithms on each of the analogous reference devices are obtained. The reference performance values may include one or more resource loading values for the execution of each of the plurality of candidate algorithms on each of the analogous reference devices. A resource loading value for the execution of a particular candidate algorithm on a reference device for example represents or otherwise indicates the burden that running the candidate algorithm places on the reference device, e.g. the burden placed on resources of the reference device such as one or more hardware resources. For example, a resource loading value may be indicative of consumption of one or more hardware resources of the device, such as a processor, storage of the device, or a power source. Use of a resource loading value in selecting a suitable algorithm for a particular device hence allows the resource loading to be accounted for in the algorithm selection, e.g. to select an algorithm that does not unduly burden the device.
The one or more reference performance values may also or instead include one or more algorithm performance values indicative of a performance of each of the plurality of candidate algorithms on each of the analogous reference devices. In these cases, an algorithm performance value for execution of a particular candidate algorithm on a reference device for example indicates how well the candidate algorithm performs, such as how effectively and/or efficiently the candidate algorithm achieves a particular aim. For example, the number of cycles per byte (CPB), which indicates the number of clock cycles performed by a processor per byte of data processed in an algorithm, can be used as an algorithm performance value, e.g. for cryptographic algorithms. Using an algorithm performance value in the selection of an algorithm for a device allows an algorithm to be selected that provides a suitable level of performance. For example, the algorithm with the best performance can be selected, provided the algorithm is suitable for the device (e.g. provided that consumption of resources during execution of the algorithm does not exceed available resources on the device).
In some cases, execution of each of the plurality of candidate algorithms includes transmission of data via a network. This may be the case for example where the candidate algorithms are cryptographic algorithms, which involve the transfer of encrypted data. In these cases, the reference performance values may include a network characteristic value indicative of a data transmission characteristic associated with the transmission of the data via the network for the execution of each of the plurality of candidate algorithms on each of the analogous reference devices. A data transmission characteristic for example provides a measure of how efficiently the data can be transmitted via the network, and may indicate a rate at which the data can be transmitted or a time taken to transmit the data via the network. Example network characteristic values include a network latency and/or a network throughput. Accounting for the network characteristic value in the selection of the algorithm allows an algorithm to be selected that is appropriate for the available network resources, e.g. to avoid over-burdening the network.
At item 208 of the method 200, the algorithm is selected based on the one or more reference performance values. The one or more reference performance values may be used in various ways to select the algorithm, as discussed further below with reference to
In some examples, one or more device performance values for execution of each of the plurality of candidate algorithms on the device is obtained. The device performance values are for example the same as the reference performance values, but for the device for which the algorithm is to be selected, rather than for a reference device. For example, the device performance values may include one or more device resource loading values for execution of each of the candidate algorithms on the device. The device resource loading values may be the same as the resource loading values described above for the reference devices, but for the device itself. The one or more device performance values may be used, in addition to the one or more reference performance values, to select the algorithm for the device. For example, the one or more device performance values may be used separately or may be combined with the one or more reference performance values (or with a measure or other metric derived from the reference performance values) to select the algorithm. In one case, a score value for each candidate algorithm is obtained using both the device and the reference performance values. Using the device performance values tends to increase the reliability of the process, meaning that a suitable algorithm is more likely to be selected than otherwise. However, in some cases, a suitable algorithm can be obtained without using the device performance values, which can increase the speed with which the algorithm is selected by omitting the procedure of obtaining the one or more device performance values.
If one or more device performance values is used, the device performance values may be obtained in various ways. For example, the device performance values for a particular candidate algorithm may be estimated based on the performance of similar algorithms on the device or may be obtained from a suitable data structure (such as a look-up table) based on execution of the candidate algorithm on a different device that has the same resource characteristics as the device (e.g. a device that is of the same make and model as the device for which the algorithm is to be selected). In one example, each of the plurality of candidate algorithms is executed on the device, and the one or more device performance values are measured for the execution of each of the candidate algorithms. This approach increases the accuracy of the device performance values obtained. In such cases, a performance value may be measured for each of a plurality of times an algorithm is executed on the device, and the obtained performance values may then be averaged to obtain a device performance value.
In some examples, the selection of the algorithm is based further on a performance constraint to be satisfied by execution of the algorithm on the device. The performance constraint for example indicates a particular requirement that must be met by the selected algorithm, e.g. such that the one or more device performance values meet particular criteria. In one example, the performance constraint is a resource loading constraint (although other constraints are possible, such as a network loading constraint). A resource loading constraint for example indicates that execution of the algorithm on the device must be associated with resource loading values that meet particular criteria, e.g. which meet or are less than a particular threshold value. This approach further refines the selection process, so as to select an algorithm that is suitable for the circumstances envisaged, so that the algorithm selected will not over-burden the device or a network to which the device is connected.
Similarly to the one or more resource characteristics for the device, the performance constraint can be obtained in various ways, e.g. from a user or using a monitoring process. In some cases, the performance constraint is derived from the one or more resource characteristics for the device. For example, if it is identified that the device has a particular amount of storage space available, this can be converted into a performance constraint, and used to identify candidate algorithms that utilise a lower amount of storage space than that available on the device.
In some examples, the candidate algorithms for which the one or more reference performance values are obtained are a subset of available candidate algorithms. In these examples, the candidate algorithms are selected from the available candidate algorithms based on the performance constraint. With this approach, candidate algorithms that are likely to be suitable for the device can be pre-selected, to reduce the number of candidate algorithms for which the reference performance values are obtained. This improves the efficiency of the selection process, by obviating the need to calculate or otherwise obtain reference performance values for candidate algorithms which are unlikely to be suitable for execution on the device. For example, if a particular candidate algorithm requires a large amount of processing power and/or storage, and the device for which the algorithm is to be selected is resource-constrained, with a smaller amount of processing power and/or storage than that needed to execute that particular candidate algorithm, that candidate algorithm is very unlikely to be suitable for use on the device. On that basis, that particular candidate algorithm can be excluded from the plurality of candidate algorithms for which the one or more reference performance values are obtained.
In some examples, the selection of the algorithm is based further on an importance metric for at least one of a plurality of reference performance values. The importance metric for a particular reference performance value for example indicates the relative importance of that reference performance value in selecting the algorithm. For example, the importance metric for a given reference performance value can be used as a weighting to weight a contribution of that reference performance value to a combined measure, such as the score value discussed above. With this approach, a greater importance (e.g. in the form of a greater weight) can be placed on a reference performance value that is considered to be more relevant in identifying a suitable algorithm for the device. This can improve the selection process, meaning that a suitable algorithm is more likely to be identified.
The importance metric for at least one of the reference performance values is received from a user in some cases, for example via a user interface. For example, a user can indicate an importance assigned to at least one of the reference performance values by entering a value in a suitable electronic form or by ranking the reference performance values as desired. This gives the user control over how the algorithm is selected, facilitating the selection of an algorithm in accordance with particular user preferences or priorities. For example, the user may be aware of other factors that may impact on the performance of a particular algorithm that are not directly accounted for in the reference performance values themselves, such as ongoing network usage by other devices or other processes on the device. The user can then appropriately assign an importance metric for at least one of the reference performance values to take account of these other factors. In other cases, though, the importance metric for at least one of the reference performance values may be obtained via a different process, e.g. by analysing subsequent performance of selected algorithms on various devices to identify an importance of respective reference performance values in selecting a suitable algorithm.
In some cases, an importance metric may also or instead be obtained for at least one of a plurality of resource characteristics of the device. Similarly to the importance metric for the at least one reference performance value, the importance metric for the at least one resource characteristic is for example indicative of a relative importance of the at least one resource characteristic in identifying one or more analogous reference devices that are similar to the device. In such cases, the importance metric for the at least one resource characteristic may for example be used to weight a contribution of respective resource characteristics to a combined measure for use in identifying the analogous reference devices. This is merely an example, though, and the importance metric for the at least one resource characteristic may be used in a different manner for identifying analogous reference devices (for example as described further below with reference to
In
For each of the reference devices 302, a dataset 304 of resource characteristics is obtained. Hence, in the example of
The classifier system 300 also includes a vector generation engine 306, which is configured to obtain a vector representation of the resource characteristics of each reference device 302, based on the dataset 304 for that reference device 302. The vector representation for a given reference device 302 provides a numerical representation of the resource characteristics of the reference device 302. The vector representations may be obtained in various ways. For example, each element of a vector may correspond to a value of a (name, value) pair of a corresponding dataset 304. In other examples, further processing may be applied to the values of a given dataset 304 to obtain a vector, e.g. using a vector embedding process to embed the values of the dataset 304 to a space of a particular dimension. The aspects of the classifier system 300 involving obtaining the datasets 304 and the vector representations for the reference devices 302 (using the vector generation engine 306) may be considered to correspond to a training phase.
After training the classifier system 300, a testing phase may then be performed to identify which of the reference devices 302 are similar to an input device 308 (such as a device for which an algorithm is to be selected). The testing phase of
In examples in which an importance metric is obtained for at least one resource characteristic, the importance metric or metrics may be used to weight the contribution of respective resource characteristics to the distance calculated by the vector generation engine 306. For example, the Euclidean distance, (x, x′), between a vector representation, x, of the device and a vector representation, x′, of a reference device may be calculated as:
d(x,x′)=√{square root over ((x1−x′1)2+ . . . +(xn−x′n)2)}
where xi indicates the ith element of the vector representation of the device and x′i indicates the ith element of the vector representation of the reference device. In this case, each element of the vector representations corresponds to a different respective resource characteristic. In this case, the contribution of different resource characteristics to the calculated distance may be weighted by multiplying each term in the expression for the Euclidean distance by a corresponding weighting factor, wi, to obtain the following expression for the Euclidean distance:
d(x,x′)=√{square root over (w1(x1−x′1)2+ . . . +wn(xn−x′n)2)}
In this case, the weighting factor is derived from the importance metric. For example, the importance metric may be used as the weighting factor for a given resource characteristic, or the importance metric may be normalised and then used as the weighting factor for a given resource characteristic. However, this is merely an example.
The distances obtained by the distance determination engine 312 are processed by an analogous device identification engine 314, which is configured to identify one or more of the reference devices 302 as analogous reference devices with similar resource characteristics to the device 308. The analogous reference devices may be identified in various manners. For example, the reference devices 302 may be ranked from most to least similar based on the distances obtained by the distance determination engine 312 and the n most similar may be selected as the analogous reference devices (where n is an integer, which may e.g. be predetermined, such as a default value, or selected by a user). In another example, reference devices 302 with a distance that satisfies a particular condition, such as a distance that meets or is less than a threshold distance, are selected as analogous reference devices. With this approach, the number of analogous reference devices identified may differ for different devices 308 depending on how many of the reference devices 302 satisfy the condition. In this example, if no reference devices 302 satisfy the condition, the most similar reference device (or the n most similar reference devices) may be selected as the analogous reference device or devices, so that it is still possible to apply the subsequent steps of the algorithm selection method (although in this situation, the selected algorithm may be less suitable than otherwise, e.g. if even the most similar reference device has relatively different resource characteristics than the device for which the algorithm is selected). In this case, it may be identified that the set of reference devices 302 do not adequately represent the types of device for which an algorithm is to be selected. To address this, at least one additional reference device can be added to the set of reference devices 302, so as to include at least one reference device which is more similar to the device. It is to be appreciated that the vector generation engine 306, the distance determination engine 312 and/or the analogous device identification engine 314 may be implemented in software, hardware or a combination of software and hardware that is suitably programmed or otherwise configured.
An example of selection of an algorithm for a device will now be described with reference to
In the example table 700 of
As noted above, the importance metrics of the resource characteristics may be entered by a user. In such cases, the user may enter the importance metrics of the resource characteristics when entering the resource characteristics themselves (e.g. via the same electronic form) or via a separate process. Entry of importance metrics of the resource characteristics is optional in some examples. In such examples, the table 700 of
The example table 800 of
A worked example will now be described with reference to the examples of
No performance metric is obtained for the resource characteristic in this case (as the analogous reference devices are identified on the basis of a single resource characteristic, which in this case is the capability to communicate via Bluetooth). However, as noted above, in other cases, at least one performance metric may be obtained for at least one of a plurality of resource characteristics, and used in identifying one or more analogous reference devices, such as the performance metrics shown in the table 700 of
In this example, a performance constraint is also received (e.g. from a user or by measuring constraint(s) of the device itself). The performance constraint in this case is that the encryption performance must be less than or equal to 100 CPB and the RAM consumption must be less than or equal to 40 kB.
Reference performance values for execution of the AES-128, GIMLI and ADIANTUM algorithms on each of devices 3 and 4 are obtained (e.g. from the tables 500, 502 of
As explained above, there are various ways in which the reference performance values may be used to select an algorithm for use on a given device. For example, a score value may be obtained for execution of each of the candidate algorithms on each of the analogous reference devices based on a weighted function of a plurality of reference performance values.
In a first example, a score value, S, for a particular candidate algorithm is expressible as follows:
where: μi is the average performance value of the ith reference performance value for execution of the candidate algorithm on each of the analogous reference devices; ci is a performance constraint for the Rh reference performance value (e.g. obtained from a user); VCi is the variance of the Rh reference performance value for execution of the candidate algorithm on each of the analogous reference devices; and Wi is the importance metric for the Rh reference performance value (which in this case corresponds to the weight for the Rh reference performance value obtained from the table 800 of
As noted above, in this example the two reference performance values used to calculate the score value are the encryption performance and the RAM consumption. In this example, the score value for a particular candidate algorithm, according to the first example, can be expressed as:
where: μe and μr are, respectively, the average performance values of the encryption performance and the RAM consumption for execution of the candidate algorithm on each of the analogous reference devices; ce and cr are, respectively, the performance constraints for the encryption performance and the RAM consumption; VCe and VCr are, respectively, the variance of the encryption performance and the RAM consumption for execution of candidate algorithm on each of the analogous reference devices; and We and Wr are, respectively, the importance metrics of the encryption performance and the RAM consumption.
In this example, ce=100 CPB and cram=40 kB, as explained above.
where
(which is the average encryption performance for execution of all of the candidate algorithms on devices 3 and 4, as can be seen from tables 500, 502 of
where
(which is the average RAM consumption for execution of all of the candidate algorithms on devices 3 and 4, as can be seen from tables 500, 502 of
For execution of the AES-128 algorithm on device 3, the encryption performance is 12 CPB and the RAM consumption is 40 kB, and for execution of the AES-128 algorithm on device 4, the encryption performance is 10 CPB and the RAM consumption is 40 kB (see tables 500, 502 of
For execution of the GIMLI algorithm on device 3, the encryption performance is 22 CPB and the RAM consumption is 28 kB, and for execution of the GIMLI algorithm on device 4, the encryption performance is 20 CPB and the RAM consumption is 28 kB (see tables 500, 502 of
For execution of the ADIANTUM algorithm on device 3, the encryption performance is 47 CPB and the RAM consumption is 35 kB, and for execution of the ADIANTUM algorithm on device 4, the encryption performance is 45 CPB and the RAM consumption is 35 kB (see tables 500, 502 of
Using this first example method, the GIMLI algorithm has the lowest score and is selected for use by the device. For example, the algorithms may be ranked from highest to lowest score, with a lower score indicating greater suitability of a particular algorithm for use by the device, and the algorithm with the lowest score selected for use. In some cases, though, a ranked list of algorithms (e.g. ranked by score value) may instead be output and processed further to select an algorithm for use by the device. For example, the algorithm with the lowest rank may not be selected if the user does not have a suitable license to use the algorithm. In such cases, a different algorithm may instead be selected (e.g. the algorithm with the second-lowest rank, or the algorithm with the lowest rank that satisfies further criteria). Such further selection of the algorithm may be performed automatically (e.g. using a suitably configured further selection routine) or may be performed by a user.
This first example is merely one way in which the reference performance values may be used to select an algorithm for a device. In a second example, a score value, S, for a particular candidate algorithm is instead expressible as follows:
where ci, VCi and Wi are as defined above, and vi indicates a measured value of the ith device performance value for execution of the candidate algorithm on the device for which the algorithm is to be selected.
If the encryption performance and the RAM consumption are again used as the reference performance values, the score value for a particular candidate algorithm according to the second example can be expressed as:
where: ve is the measured encryption performance of the candidate algorithm on the device; vr is the measured RAM consumption of the candidate algorithm on the device; and ce, cr, VCe, VCr, We and Wr are as defined above.
The values of ce, cr, VCe, VCr, We and Wr are as given above for the first example. However, for execution of the AES-128 algorithm on the device, ve=14 CPB and vr=35 kB. This gives a score value for the AES-128 algorithm of 0.076 according to the second example. For execution of the GIMLI algorithm on the device, ve=15 CPB and vr=40 kB. This gives a score value for the GIMLI algorithm of 0.081 according to the second example. For execution of the ADIANTUM algorithm on the device, ve=11 CPB and vr=30 kB. This gives a score value for the ADIANTUM algorithm of 0.062 according to the second example. Using this second example method, the ADIANTUM algorithm has the lowest score and is therefore selected for use by the device (although as explained above with reference to the first example, this need not be the case in all examples).
As can be seen, different approaches to calculating a score value for candidate algorithms can lead to different candidate algorithms being identified as most suitable for use on a particular device. In the examples above, the score values obtained according to the second example tend to be more accurate as it is based on device performance values for execution of candidate algorithms on the device, which are e.g. measured values. However, use of device performance values in selecting an algorithm (and hence, calculation of score values according to the second example) tends to be more resource-intensive and slower than other approaches that do not use such values (such as the method of the first example).
To address this, the values used in the selection of the algorithm for the device may themselves be selected based on various criteria such as a desired accuracy, resource usage, whether the device is accessible (e.g. whether a candidate algorithm can be executed on the device, which may not be possible if no physical or network access to the device is provided at the time the algorithm is to be selected), authorisation (e.g. whether a user or device is authorised to execute a candidate algorithm on the device), and/or desired level of interactivity or automation (e.g. whether the user wishes to enter values themselves or would prefer for values to be detected automatically), although this is not intended to be an exhaustive list. For example, if a desired accuracy is relatively high, a relatively high level of resource usage is acceptable, the device is accessible, authorisation has been provided for execution of candidate algorithms on the device and/or automation is allowed, the algorithm may be selected based on one or more device performance values, e.g. according to the second example. If otherwise, though, or if it is otherwise not possible to obtain device performance values, the algorithm may be selected without use of device performance values, e.g. according to the first example.
The data processing system 1000 includes storage 1002 which may be or include volatile or non-volatile memory, read-only memory (ROM), or random access memory (RAM). The storage 1002 may additionally or alternatively include a storage device, which may be removable from or integrated within the data processing system 1000. For example, the storage 1002 may include a hard disk drive (which may be an external hard disk drive such as a solid state disk) or a flash drive. The storage 1002 is arranged to store data, temporarily or indefinitely. For example, if the data processing system 1000 is used to select an algorithm for use by a device according to the examples herein, the storage 1002 may for example store a respective value for one or more resource characteristics of the device, a respective value for one or more resource characteristics of at least one reference device, one or more performance values for execution of one or more candidate algorithms on each of one or more analogous reference devices, one or more device performance values, a performance constraint to be satisfied by execution of the algorithm on the device, and/or various values generated, e.g. based on the one or more performance values and/or the one or more device performance values, for use in the selection of the algorithm, such as score values for respective candidate algorithms. The storage 1002 may be referred to as memory, which is to be understood to refer to a single memory or multiple memories operably connected to one another.
The storage 1002 may be or include a non-transitory computer-readable medium. A non-transitory computer-readable storage medium includes, but is not limited to, volatile memory, non-volatile memory, magnetic and optical storage devices such as disk drives, magnetic tape, compact discs (CDs), digital versatile discs (DVDs), or other media that are capable of storing code and/or data.
The data processing system 1000 also includes at least one processor 1004 which is configured for use in implementing any of the methods herein. The at least one processor 1004 may be or comprise processor circuitry. The at least one processor 1004 is arranged to execute program instructions and process data. The at least one processor 1004 may include a plurality of processing units operably connected to one another, including but not limited to a central processing unit (CPU) and/or a graphics processing unit (GPU).
The data processing system 1000 further includes a network interface 1006 for connecting to at least one network, e.g. to receive data such as that which may then be stored in the storage 1002 and/or to communicate with another data processing system via a network. For example, the data processing system 1000 may select an algorithm for use by a device and then send a command, via the network interface 1006, to instruct the device to implement the algorithm. The components of the data processing system 1000 are communicably coupled via a suitable bus 1008.
Further examples are envisaged. Examples above describe the selection of an algorithm for an IoT device. However, it is to be appreciated that any of the methods and systems described herein may be used to select an algorithm for a different type of processor-controlled device, e.g. so as to select an algorithm that makes efficient use of the resources of the device and/or that achieves a particular performance level. Moreover, although examples above describe the selection of a cryptographic algorithm, it is to be appreciated that the methods herein may be used to select other types of algorithm than cryptographic algorithms.
In
Further examples relate to a computer-readable medium storing thereon instructions which, when executed by a computer, cause the computer to carry out the method of any of the examples described herein.
Each feature disclosed herein, and (where appropriate) as part of the claims and drawings may be provided independently or in any appropriate combination. Any apparatus feature may also be provided as a corresponding step of a method, and vice versa.
In general, it is noted herein that while the above describes examples, there are several variations and modifications which may be made to the described examples without departing from the scope of the appended claims. One skilled in the art will recognise modifications to the described examples.
Any reference numerals appearing in the claims are for illustration only and shall not limit the scope of the claims. As used throughout, the word ‘or’ can be interpreted in the exclusive and/or inclusive sense, unless otherwise specified.
Number | Date | Country | Kind |
---|---|---|---|
2105235.2 | Apr 2021 | GB | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/EP2022/056828 | 3/16/2022 | WO |