Skip to content
Snippets Groups Projects
Select Git revision
  • ce50686f85936e3703357af7ea1b2e0c55cca6fc
  • master default protected
  • siv-mode
  • delete-des-compat
  • delete-rsa_blind
  • aes-struct-layout
  • master-updates
  • release-3.4-fixes
  • struct-layout
  • attribute-deprecated
  • rename-data-symbols
  • x86_64-sha_ni-sha256
  • ecc-params-tweak
  • delete-old-aes
  • cmac-support
  • x86_64-sha_ni-sha1
  • gcm-ctr-opt
  • ctr-opt
  • skein
  • api-opaque-fix
  • curve448
  • nettle_3.4.1_release_20181204
  • nettle_3.4.1rc1
  • nettle_3.4_release_20171119
  • nettle_3.4rc2
  • nettle_3.4rc1
  • nettle_3.3_release_20161001
  • nettle_3.2_release_20160128
  • nettle_3.1.1_release_20150424
  • nettle_3.1_release_20150407
  • nettle_3.1rc3
  • nettle_3.1rc2
  • nettle_3.1rc1
  • nettle_3.0_release_20140607
  • nettle_2.7.1_release_20130528
  • nettle_2.7_release_20130424
  • nettle_2.6_release_20130116
  • nettle_2.5_release_20120707
  • converted-master-branch-to-git
  • nettle_2.4_release_20110903
  • nettle_2.3_release_20110902
41 results

aes-decrypt-table.c

Blame
  • Forked from Nettle / nettle
    Source project has a limited visibility.
    • Niels Möller's avatar
      bc527459
      * aes-internal.h (struct aes_table): sparc_idx[0] should now · bc527459
      Niels Möller authored
      contain index values shifted by the size of a word, and with 2
      added. This saves some additions in the sparc assembler code.
      Updates aes-encrypt-table.c and aes-decrypt-table.c.
      
      * aes-internal.h (struct aes_table): Renamed the shift_idx field
      to sparc_idx, as it will be tweaked to improve the sparc code.
      Also reduced its size to [2][4].
      (IDX_FACTOR): Deleted constant.
      * aes-encrypt-table.c (_aes_encrypt_table): Adapted initializer of
      sparc_idx.
      * aes-decrypt-table.c (_aes_decrypt_table): Likewise.
      * asm.m4: Deleted AES_SIDX2, to match struct aes_table.
      
      Rev: src/nettle/aes-decrypt-table.c:1.3
      Rev: src/nettle/aes-encrypt-table.c:1.3
      Rev: src/nettle/aes-internal.h:1.8
      bc527459
      History
      * aes-internal.h (struct aes_table): sparc_idx[0] should now
      Niels Möller authored
      contain index values shifted by the size of a word, and with 2
      added. This saves some additions in the sparc assembler code.
      Updates aes-encrypt-table.c and aes-decrypt-table.c.
      
      * aes-internal.h (struct aes_table): Renamed the shift_idx field
      to sparc_idx, as it will be tweaked to improve the sparc code.
      Also reduced its size to [2][4].
      (IDX_FACTOR): Deleted constant.
      * aes-encrypt-table.c (_aes_encrypt_table): Adapted initializer of
      sparc_idx.
      * aes-decrypt-table.c (_aes_decrypt_table): Likewise.
      * asm.m4: Deleted AES_SIDX2, to match struct aes_table.
      
      Rev: src/nettle/aes-decrypt-table.c:1.3
      Rev: src/nettle/aes-encrypt-table.c:1.3
      Rev: src/nettle/aes-internal.h:1.8
    admin.c 3.97 KiB
    /*
     * $Id: admin.c,v 0.9 1993/10/10 22:36:40 ceder Exp $
     * Copyright (C) 1991  Lysator Academic Computer Association.
     *
     * This file is part of the LysKOM server.
     * 
     * LysKOM is free software; you can redistribute it and/or modify it
     * under the terms of the GNU General Public License as published by 
     * the Free Software Foundation; either version 1, or (at your option) 
     * any later version.
     * 
     * LysKOM is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
     * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     * for more details.
     * 
     * You should have received a copy of the GNU General Public License
     * along with LysKOM; see the file COPYING.  If not, write to
     * Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
     * or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
     * MA 02139, USA.
     *
     * Please mail bug reports to bug-lyskom@lysator.liu.se. 
     */
    /*
     * admin.c
     *
     * Administrative calls.
     */
    
    static char *rcsid = "$Id: admin.c,v 0.9 1993/10/10 22:36:40 ceder Exp $";
    #include "rcs.h"
    USE(rcsid);
    
    #include <stdio.h>
    #include <setjmp.h>
    
    #include "misc-types.h"
    #include "kom-types.h"
    #include "manipulate.h"
    #include "com.h"
    #include "connections.h"
    #include "kom-errno.h"
    #include "cache.h"
    #include "config.h"
    #include "log.h"
    #include "send-async.h"
    
    Info kom_info = 
    {
    #include "version.incl"
        ,				/* version */
        1,				/* conf_pres_conf */
        2,				/* pers_pres_conf */
        3,				/* motd_conf */
        4,				/* kom_news_conf */
        0				/* motd_of_lyskom */
    };
    
    /*
     * Return info about this server. This can (and should) be done
     * before logging in. modt_of_lyskom should be displayed before
     * prompting for username if it isn't 0.
     */
    extern Success
    get_info( Info *result )
    {
        *result = kom_info;
        return OK;
    }
    
    /* /// */
    extern Success
    set_motd_of_lyskom (Text_no motd)
    {
        Text_stat *old_motd = NULL;
        Text_stat *new_motd = NULL;
    
        CHK_LOGIN(FAILURE);
    
        if ( !ENA(admin, 1) )
        {
    	kom_errno = KOM_PERM;
    	return FAILURE;
        }
        
        /* Check that the new motd exists before deleting the old*/
    
        if ( motd != 0 )
        {
    	GET_T_STAT(new_motd, motd, FAILURE);
    	if ( new_motd->no_of_marks >= MAX_MARKS_TEXT )
    	{
    	    log("LIMIT: set_motd_of_lyskom(%d): New motd has %d marks.\n",
    		motd, new_motd->no_of_marks);
    	    kom_errno = KOM_MARK_LIMIT;
    	    return FAILURE;
    	}
        }
        
        /* Unmark the previous motd if it exists. */
    
        if ( kom_info.motd_of_lyskom != 0
    	&& (old_motd = cached_get_text_stat(kom_info.motd_of_lyskom)) != NULL)
        {
    	if ( old_motd->no_of_marks > 0 )
    	{
    	    --old_motd->no_of_marks;
    	    mark_text_as_changed( kom_info.motd_of_lyskom );
    	}
    	else
    	{
    	    log("ERROR: do_set_motd(): Old motd not marked\n");
    	}
        }
    
        /* Mark the new motd */
    
        if ( motd != 0 )
        {
    	++new_motd->no_of_marks;
    	mark_text_as_changed( motd );
        }
        
        kom_info.motd_of_lyskom = motd;
    
        return OK;
    }
    
    
    
    
    /*
     * Force all clients to read a message.
     * Sends an asynchronous message. This is obsoleted by send_message.
     */
    extern Success
    broadcast (String message)
    {
        CHK_LOGIN(FAILURE);
    
        if (s_strlen(message) > BROADCAST_LEN)
        {
    	kom_errno = KOM_LONG_STR;
    	return FAILURE;
        }
    
        async_broadcast(ACTPERS, message);
        return OK;
    }
    
    /*
     * Send a message
     */
    extern Success
    send_message (Pers_no recipient,
    	      const String message)
    {
        CHK_LOGIN(FAILURE);
    
        if (s_strlen(message) > BROADCAST_LEN)
        {
    	kom_errno = KOM_LONG_STR;
    	return FAILURE;
        }
    
        return async_send_message(recipient, ACTPERS, message);
    }
    
    
    
    /*
     * Make LysKOM sync its files.
     */
    extern Success
    sync_kom (void) 
    {
        cache_sync_all();
        dump_statistics();
        return OK;
    }
    
    /*
     * Close LysKOM. exit_val is (currently) not used. The database is synced.
     */
    extern Success
    shutdown_kom (int exit_val) 
    {
        CHK_LOGIN(FAILURE);
        if ( !ENA(admin, 1) )
        {
    	kom_errno = KOM_PERM;
    	return FAILURE;
        }
    
        go_and_die = TRUE;
        return OK;
    }